[issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time

2016-09-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> out of date status: open -> closed ___ Python tracker ___

[issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time

2013-11-05 Thread Paweł Wroniszewski
New submission from Paweł Wroniszewski: I encountered the problem in logging module, but it is broader then that. Have a look at the following code: import time DATE_FORMAT = '%d/%b/%Y %H:%M:%S%z %Z' print(time.strftime(DATE_FORMAT)) print(time.strftime(DATE_FORMAT,time.localtime()))

[issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time

2013-11-05 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +belopolsky, r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19502 ___ ___

[issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time

2013-11-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I cannot reproduce this and I suspect that the problem shows up only in certain times. I believe this is related to the long-standing issue that was fixed in 3.3. See issue 1667546. In Python prior to 3.3, time_struct did not store timezone

[issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time

2013-11-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The documentation for time.strftime(format[, t]) reads: If t is not provided, the current time as returned by localtime() is used but apparently there must be something extra going on under the hood. Yes, the C implementation uses tm_zone and tm_gmtoff