I have data that is the utc offset and the utc time, given that is it possible to get the users local timezone (mainly to figure if it is dst etc. probably using pytz), similar to the function in php timezone_name_from_abbr ?
For example:
If my epoch time is: 1238720309 I can get the utc time as:
d = datetime.utcfromtimestamp(1238720309) print d + dt.timedelta(0,-28800) #offset for pacific I think 2009-04-02 17:04:41.712143
this is correct except it is pdt right now so it should be: 2009-04-02 18:04:41.712413 I need to the timezone to use in pytz to figure out if it is daylight saving I think?