You can convert via Unix timestamp (UTC):
foreign_naive = datetime.datetime(2012, 3, 11, 6, 0, 0) foreign_timezone = 'US/Eastern' foreign_dt = pytz.timezone(foreign_timezone).localize(foreign_naive) timestamp = time.mktime(foreign_dt).astimezone(pytz.utc).timetuple() local_dt = datetime.datetime.fromtimestamp(timestamp)
This uses a solution from Python. Create a unix timestamp of five minutes in the future .
Note that this will not tell you what the local time zone is, although you can find out its offset from UTC at this time using:
(local_dt - datetime.datetime.utcfromtimestamp(timestamp)).seconds
source share