It seems odd, but I can't find an easy way to find the local timezone using Pandas / pytz in Python.
I can do:
>>> pd.Timestamp('now', tz='utc').isoformat() Out[47]: '2016-01-28T09:36:35.604000+00:00' >>> pd.Timestamp('now').isoformat() Out[48]: '2016-01-28T10:36:41.830000' >>> pd.Timestamp('now').tz_localize('utc') - pd.Timestamp('now', tz='utc') Out[49]: Timedelta('0 days 01:00:00')
Which will give me a timezone, but this is probably not the best way to do this ... Is there a command in pytz or pandas to get the system timezone? (preferably in python 2.7)
source share