There is only one truth. It is the source.
January 6, 2013
In Python when you want to convert a struct_time to Unix time you use time.mktime() for local time and calendar.timegm() for UTC. time.localtime() is the inverse of time.mktime(). time.gmtime() is the inverse of calendar.timegm().
Why the hell is timegm() in the calendar module and all his friends are in the time module?