Akira Li added the comment:

One of the ways to fix this issue is to synchronize time.tzname 
attribute with the corresponding C tzname variable.

I've uploaded sync-time-timezone-attr-with-c.diff patch that
synchronizes tzname, timezone, altzone, daylight attributes.
The patch also includes tests. No docs changes are necessary.
The code follows C, POSIX standards and the time module documentation.
Any differences are unintetional.

The patch also fixes "wrong time.timezone" issue
http://bugs.python.org/issue22799

The patch doesn't use tm_gmtoff, tm_zone C values from jan, jul to set 
timezone, tzname time module attributes therefore it may break
software that relies on that behaviour. I would be interested to hear
about such instances.

I've removed the cygwin branch in the code (I haven't found cygwin 
buildbot). It could be added back as is if necessary.

----------
Added file: http://bugs.python.org/file37273/sync-time-timezone-attr-with-c.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22798>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to