[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

Daniel Diniz report at bugs.python.org
Sat Apr 5 21:37:37 CEST 2008


Daniel Diniz <ajaksu2 at users.sourceforge.net> added the comment:

New patch. I added the new rule and changed the old behavior to be wrong
(a bit) less often. It may mess with code that depended on the previous
wrong results. Given the (AFAIK) exemplificative nature of this file,
this should not be a big problem.

I was going to add a complete table for US DSTs rules, but that is
already available in pytz (http://sourceforge.net/projects/pytz/ ) and
there are many special cases for different US states.

Changes:
Added a four periods approach (the three in my last msg plus "before
1967" -> no DST).
Added links to the Olson Database and pytz (which IMHO would be a great
addition to the std-lib).
Tried to explain the rules, but I think the resulting text is pretty bad.
Corrected a UnboundLocalError bug in my previous patch.

Added file: http://bugs.python.org/file9953/tzinfo-examples3.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2525>
__________________________________


More information about the Python-bugs-list mailing list