Log message for revision 80958:
  tidy up legacy time zones

Changed:
  U   Zope/trunk/lib/python/DateTime/DateTime.py
  U   Zope/trunk/lib/python/DateTime/tests/testDateTime.py

-=-
Modified: Zope/trunk/lib/python/DateTime/DateTime.py
===================================================================
--- Zope/trunk/lib/python/DateTime/DateTime.py  2007-10-23 11:32:45 UTC (rev 
80957)
+++ Zope/trunk/lib/python/DateTime/DateTime.py  2007-10-23 11:47:27 UTC (rev 
80958)
@@ -150,7 +150,7 @@
 
 class _cache:
 
-    _zlst=['Brazil/Acre','Brazil/DeNoronha','Brazil/East',
+    _zlst=['Brazil/Acre','Brazil/East', #'Brazil/DeNoronha',
            'Brazil/West','Canada/Atlantic','Canada/Central',
            'Canada/Eastern','Canada/East-Saskatchewan',
            'Canada/Mountain','Canada/Newfoundland',
@@ -184,17 +184,17 @@
            'MEWT','SWT','FWT','EET','EEST','BT','ZP4','ZP5','ZP6',
            'WAST','CCT','JST','EAST','GST','NZT','NZST','IDLE']
 
-    _zmap={'aest':'GMT+1000', 'aedt':'GMT+1100',
-           'aus eastern standard time':'GMT+1000',
-           'sydney standard time':'GMT+1000',
-           'tasmania standard time':'GMT+1000',
-           'e. australia standard time':'GMT+1000',
+    _zmap={'aest':'GMT+10', 'aedt':'GMT+11',
+           'aus eastern standard time':'GMT+10',
+           'sydney standard time':'GMT+10',
+           'tasmania standard time':'GMT+10',
+           'e. australia standard time':'GMT+10',
            'aus central standard time':'GMT+0930',
            'cen. australia standard time':'GMT+0930',
-           'w. australia standard time':'GMT+0800',
+           'w. australia standard time':'GMT+8',
 
            'brazil/acre':'Brazil/Acre',
-           'brazil/denoronha':'Brazil/Denoronha',
+           #'brazil/denoronha':'Brazil/Denoronha',
            'brazil/east':'Brazil/East','brazil/west':'Brazil/West',
            'canada/atlantic':'Canada/Atlantic',
            'canada/central':'Canada/Central',
@@ -203,7 +203,7 @@
            'canada/mountain':'Canada/Mountain',
            'canada/newfoundland':'Canada/Newfoundland',
            'canada/pacific':'Canada/Pacific','canada/yukon':'Canada/Yukon',
-           'central europe standard time':'GMT+0100',
+           'central europe standard time':'GMT+1',
            'chile/continental':'Chile/Continental',
            'chile/easterisland':'Chile/EasterIsland',
            'cst':'US/Central','cuba':'Cuba','est':'US/Eastern','egypt':'Egypt',

Modified: Zope/trunk/lib/python/DateTime/tests/testDateTime.py
===================================================================
--- Zope/trunk/lib/python/DateTime/tests/testDateTime.py        2007-10-23 
11:32:45 UTC (rev 80957)
+++ Zope/trunk/lib/python/DateTime/tests/testDateTime.py        2007-10-23 
11:47:27 UTC (rev 80958)
@@ -17,7 +17,7 @@
 import time
 import unittest
 
-from DateTime.DateTime import _findLocalTimeZoneName
+from DateTime.DateTime import _findLocalTimeZoneName, _cache
 from DateTime import DateTime
 from datetime import datetime
 import pytz
@@ -505,6 +505,14 @@
         dt4 = DateTime('2007-10-04T10:00:00+05:00')
         sdt4 = datetime(2007, 10, 4, 5, 0)
         self.assertEqual(dt4.utcdatetime(), sdt4)
+    
+    def testLegacyTimezones(self):
+        # check that all the legacy timezone names can actually be looked up
+        cache = _cache()
+        for key in cache._zmap.keys():
+            tz = cache[key]
+        for key in cache._zlst:
+            tz = cache[key]
 
 
 def test_suite():

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to