I have verified that dateutils.tz.tzlocal() does not work on heroku and even if it did, wouldn't it just get the tz from the OS of the computer its on, not necessarly the users?
Short of storing a users timezone, is there any way to determine where a request is coming from? (I'm using flask)
Twitter does have a setting to adjust your timezone but I'm wondering how they determine what the default should be and how that would work when a user is not logged in.
You could use Javascript and set the client's time zone in a cookie. You could even use an AJAX request and then send the offset to the server and save in the client's session.
var offset = new Date().getTimezoneOffset();
Description
The time-zone offset is the difference, in minutes, between UTC and local time. Note that>this means that the offset is positive if the local timezone is behind UTC and negative if it is ahead. For example, if your time zone is UTC+10 (Australian Eastern Standard Time), -600 will be returned. Daylight savings time prevents this value from being a constant even for a given locale
Mozilla Javascript Reference: getTimezoneOffset