datetime.stdptime help

mblume mblume at socha.net
Wed May 28 13:19:27 EDT 2008


Am Tue, 27 May 2008 12:37:34 -0700 schrieb Dennis Lee Bieber:
> 
> 	From the library reference:
> """
> Support for the %Z directive is based on the values contained in tzname
> and whether daylight is true. Because of this, it is platform-specific
> except for recognizing UTC and GMT which are always known (and are
> considered to be non-daylight savings timezones). """
> 
> 	The only value that passed for me was UTC (I didn't try GMT) but...
> 
For me, only UTC, GMT, CET and CEST (Central European [Summer] Time) work.
My time.tzname is ('CET', 'CEST').
I think the documentation must be read that ***only*** 
UTC,GMT,time.tzname work.

Also, time zone names are not unique: EST can be Eastern Summer Time (US) 
as well as Eastern Summer Time (Australia).

For working with time zones, I think that a module like pytz
http://pytz.sourceforge.net/
may be better suited.

My 0.02c.
Martin



More information about the Python-list mailing list