[Tutor] time.mktime(time.gmtime(time tuple from any timezone))always will be the same ?

Alan Gauld alan.gauld at btinternet.com
Sat Jul 14 00:21:35 CEST 2007

"Arun Kumar PG" <arunkumarpg at gmail.com> wrote

> May be a dumb question but I am a bit confused (may be coz working 
> over 24
> hours for the last couple days:)). so the question is:
> No matter which timezone I am in if i say 
> time.gmtime(time.mktime((
> datetime.date().timetuple()))) I will always get the same value. - 
> right ?

Hopefully. There is a slight chance that odd things will happen around
the international dateline - Timezones are funny things and devilishly
hard to get exactly right in all situations, but by and large gmtime
will allways return the UTC (aka GMT) time

Alan G 

More information about the Tutor mailing list