[issue15941] Time module: effect of time.timezone change

Alexander Belopolsky report at bugs.python.org
Fri Sep 14 03:02:39 CEST 2012


Alexander Belopolsky added the comment:

I've read this more carefully and I now understand the issue.  Indeed, setting time.timezone or time.altzone has no effect on say time.strftime('%z').  I think this should be documented and the doc should refer to time.tzset() for a proper way to change these variables.

As for making them read only, I don't think there is a non-hackish way to make module globals read-only.

I also believe that rather than improving these variables we should encourage people to use datetime module's new timezone features because at almost any location on Earth timezone offset is not a constant and varies over time.

----------

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


More information about the Python-bugs-list mailing list