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

Alexander Belopolsky report at bugs.python.org
Tue Nov 5 16:30:49 CET 2013


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 fields on the platforms that support them.   I won't be unreasonable to document this fact in 2.7.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19502>
_______________________________________


More information about the Python-bugs-list mailing list