Issue 1459642: time.timezone / time.strftime('%z') problem (original) (raw)
The information returned by time.timezone and time.strftime('%z') are different!
I get the following results:
[simon@simon ~]$ date +%z +0200 [simon@simon ~]$ date +%Z CEST [simon@simon ~]$ python Python 2.4.2 (#1, Feb 12 2006, 03:45:41) [GCC 4.1.0 20060210 (Red Hat 4.1.0-0.24)] on linux2 [...]
time.timezone -3600 time.strftime('%z') '+0200'
Please correct me if I'm wrong, but shouldn't "time.timezone" return -7200 ?
Logged In: YES user_id=849994
time.timezone is documented to return the offset for the current non-DST timezone. Your timezone is CEST, which is CET (+0100) plus DST, which is indicated by time.daylight being nonzero.