Given the example below:
import datetime
import pprint
import time
now_unaware = datetime.datetime.now()
print "Time gotten from the OS: "
pprint.pprint now_unaware
#OUTPUT: datetime.datetime(2016, 4, 7, 17, 4, 54, 689054)
#COMMENT: The time is correct for the zone, but now_unaware doesn't explicitly know what zone is this.
print "My timezone:"
pprint.pprint(time.tzname[time.daylight])
##OUTPUT: 'CEST'
Please confirm or disprove my assumptions.
Assumptions
Given the above information above I should have enough information to:
- Make
now_unaware
aware of the timezone without any timezone hard coding because 'CEST' unambiguously defines a relation to UTC - Be able to convert
now_unaware
to UTC without importing any additional libraries - Not being able to do this given the above information is either a python design flaw or a wrong mindset on approaching the problem