[Zope-dev] Moving all timezone support to use pytz in r81039
Laurence Rowe
l at lrowe.co.uk
Wed Oct 24 11:26:52 EDT 2007
> * Move all timezone usage to use pytz
> * Add support to timezone aware datetime conversion
> * Correct capitalization of Brazil/DeNoronha
>
> All previous timezone names are tested against the new pytz based timezones.
> This test shows that the following zones changed when pytz support was added
> (i.e. not in this commit):
>
> t1 = time.mktime(datetime(2002, 1, 1).timetuple())
> t2 = time.mktime(datetime(2002, 7, 1).timetuple())
> expected_failures = [ # zone.info(t1) newzone.info(t1) zone.info(t2) newzone.info(t2)
> 'Jamaica', # (-18000, 0, 'EST') (-18000, 0, 'EST') (-14400, 1, 'EDT') (-18000, 0, 'EST')
> 'Turkey', # (10800, 0, 'EET') (7200, 0, 'EET') (14400, 1, 'EET DST') (10800, 1, 'EEST')
> 'Mexico/BajaSur', # (-25200, 0, 'MST') (-25200, 0, 'MST') (-25200, 0, 'MST') (-21600, 1, 'MDT')
> 'Mexico/General', # (-21600, 0, 'CST') (-21600, 0, 'CST') (-21600, 0, 'CST') (-18000, 1, 'CDT')
> 'Canada/Yukon', # (-32400, 0, 'YST') (-28800, 0, 'PST') (-28800, 1, 'YDT') (-25200, 1, 'PDT')
> 'Brazil/West', # (-10800, 1, 'WDT') (-14400, 0, 'AMT') (-14400, 0, 'WST') (-14400, 0, 'AMT')
> 'Brazil/Acre', # (-14400, 1, 'ADT') (-18000, 0, 'ACT') (-18000, 0, 'AST') (-18000, 0, 'ACT')
> ]
>
> The most likely explanation for this is that the old database was out of date.
Old pickles should not break as only the timezone name (the _tz
attribute) is stored on the pickle.
The old _timezone class, _zmap and _zlst are moved to tests/legacy.py so
that they may be used in the compatibility test.
DateTimeZone.py is no longer used except for compatibility tests.
Laurence
More information about the Zope-Dev
mailing list