[Zope3-checkins] CVS: Zope3/src/zope/app - timezones.py:1.2

Tres Seaver tseaver@zope.com
Wed, 12 Feb 2003 16:58:29 -0500


Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv5534

Modified Files:
	timezones.py 
Log Message:


  - Fix trailing commas on turnover tick lists.

  - Add script used to dump the data as a test.

  - File now dumps to itself, minus the prologue and epilogue.


=== Zope3/src/zope/app/timezones.py 1.1 => 1.2 === (2099/2199 lines abridged)
--- Zope3/src/zope/app/timezones.py:1.1	Wed Feb 12 16:26:28 2003
+++ Zope3/src/zope/app/timezones.py	Wed Feb 12 16:58:28 2003
@@ -15,324 +15,590 @@
 
 $Id$
 """
+
 historical_zone_info = {
+'Brazil/Acre': ('Brazil/Acre', 101, 2,
+[ '561970800', '571644000', '593420400', '603093600', '625561200',
+'634543200', '656924400', '665992800', '688374000', '697442400',
+'719823600', '729496800', '751273200', '760946400', '782722800',
+'792396000', '814863600', '823845600', '846226800', '855295200',
+'877676400', '887436000', '909126000', '918799200', '940575600',
+'950248800', '972716400', '981698400', '1004079600', '1013148000',
+'1035529200', '1044597600', '1066978800', '1076738400', '1098428400',
+'1108101600', '1129878000', '1139551200', '1162018800', '1171000800',
+'1193382000', '1202450400', '1224831600', '1234591200', '1256281200',
+'1265954400', '1287730800', '1297404000', '1319180400', '1328853600',
+'1351234800', '1360303200', '1382684400', '1391752800', '1414134000',
+'1423893600', '1445583600', '1455256800', '1477033200', '1486706400',
+'1509174000', '1518156000', '1540537200', '1549605600', '1571986800',
+'1581055200', '1603436400', '1613109600', '1634886000', '1644559200',
+'1666335600', '1676008800', '1698476400', '1707458400', '1729839600',
+'1738908000', '1761289200', '1771048800', '1792738800', '1802412000',
+'1824188400', '1833861600', '1856329200', '1865311200', '1887692400',
+'1896760800', '1919142000', '1928210400', '1950591600', '1960351200',
+'1982041200', '1991714400', '2013490800', '2023164000', '2045631600',
+'2054613600', '2076994800', '2086063200', '2108444400', '2118204000',
+'2139894000',
+], 
+'\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01',
+[(-18000, 0, 0), (-14400, 1, 4)], 'AST\x00ADT\x00'),
+'Brazil/DeNoronha': ('Brazil/DeNoronha', 101, 2,
+[ '561960000', '571633200', '593409600', '603082800', '625550400',
+'634532400', '656913600', '665982000', '688363200', '697431600',
+'719812800', '729486000', '751262400', '760935600', '782712000',
+'792385200', '814852800', '823834800', '846216000', '855284400',
+'877665600', '887425200', '909115200', '918788400', '940564800',
+'950238000', '972705600', '981687600', '1004068800', '1013137200',
+'1035518400', '1044586800', '1066968000', '1076727600', '1098417600',
+'1108090800', '1129867200', '1139540400', '1162008000', '1170990000',
+'1193371200', '1202439600', '1224820800', '1234580400', '1256270400',
+'1265943600', '1287720000', '1297393200', '1319169600', '1328842800',
+'1351224000', '1360292400', '1382673600', '1391742000', '1414123200',
+'1423882800', '1445572800', '1455246000', '1477022400', '1486695600',
+'1509163200', '1518145200', '1540526400', '1549594800', '1571976000',
+'1581044400', '1603425600', '1613098800', '1634875200', '1644548400',
+'1666324800', '1675998000', '1698465600', '1707447600', '1729828800',
+'1738897200', '1761278400', '1771038000', '1792728000', '1802401200',

[-=- -=- -=- 2099 lines omitted -=- -=- -=-]

+'1081072800', '1099213200', '1112522400', '1130662800', '1143972000',
+'1162112400', '1175421600', '1193562000', '1207476000', '1225011600',
+'1238925600', '1256461200', '1270375200', '1288515600', '1301824800',
+'1319965200', '1333274400', '1351414800', '1365328800', '1382864400',
+'1396778400', '1414314000', '1428228000', '1445763600', '1459677600',
+'1477818000', '1491127200', '1509267600', '1522576800', '1540717200',
+'1554631200', '1572166800', '1586080800', '1603616400', '1617530400',
+'1635670800', '1648980000', '1667120400', '1680429600', '1698570000',
+'1712484000', '1730019600', '1743933600', '1761469200', '1775383200',
+'1792918800', '1806832800', '1824973200', '1838282400', '1856422800',
+'1869732000', '1887872400', '1901786400', '1919322000', '1933236000',
+'1950771600', '1964685600', '1982826000', '1996135200', '2014275600',
+'2027584800', '2045725200', '2059034400', '2077174800', '2091088800',
+'2108624400', '2122538400', '2140074000',
+], 
+'\x00\x01\x00\x01\x02\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01',
+[(-25200, 1, 0), (-28800, 0, 4), (-25200, 1, 8)], 'PDT\x00PST\x00PWT\x00'),
+'US/Samoa': ('US/Samoa', 2, 3,
+[ '-86878800', '439038000',
+], 
+'\x01\x02',
+[(-39600, 0, 0), (-39600, 0, 4), (-39600, 0, 8)], 'NST\x00BST\x00SST\x00'),
+'Universal': ('Universal', 0, 1,
+[ ], 
+'',
+[(0, 0, 0)], 'GMT\x00'),
 }
+
+def dumpTimezoneInfo(_data):
+
+    print "historical_zone_info = {"
+
+    items = _data.items()
+    items.sort()
+    for key, value in items:
+        v1, v2, v3, ilist, bitmap, two_by_three, two_nullterm = value
+        print "'%s': ('%s', %s, %s," % (key, v1, v2, v3)
+        print "[",
+        while ilist:
+            next_5, ilist = ilist[:5], ilist[5:]
+            line = ", ".join(["'%s'" % x for x in next_5])
+            print "%s," % line
+        print "], "
+        print "%s," % repr(bitmap)
+        print "%s, %s)," % (repr(two_by_three), repr(two_nullterm))
+
+    print "}"
+
+if __name__ == '__main__':
+    dumpTimezoneInfo(historical_zone_info)