Let\'s say I have a variable t that\'s set to this:
datetime.datetime(2009, 7, 10, 18, 44, 59, 193982, tzinfo=)
If I say s
Think your should look around: datetime.astimezone()
http://docs.python.org/library/datetime.html#datetime.datetime.astimezone
Also see pytz module - it's quite easy to use -- as example:
eastern = timezone('US/Eastern')
http://pytz.sourceforge.net/
Example:
from datetime import datetime
import pytz
from tzlocal import get_localzone # $ pip install tzlocal
utc_dt = datetime(2009, 7, 10, 18, 44, 59, 193982, tzinfo=pytz.utc)
print(utc_dt.astimezone(get_localzone())) # print local time
# -> 2009-07-10 14:44:59.193982-04:00