Trees | Indices | Help |
|
---|
|
object --+ | list --+ | point.Points --+ | Zones
Since: 0.6.0
|
|||
new list |
|
||
list
|
|
||
list
|
|
||
Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|
Parse zoneinfo zone description data files import_locations() returns a list of Zone objects. It expects data files in one of the following formats: AN +1211-06900 America/Curacao AO -0848+01314 Africa/Luanda AQ -7750+16636 Antarctica/McMurdo McMurdo Station, Ross Island Files containing the data in this format can be found in zone.tab file that is normally found in /usr/share/zoneinfo on UNIX-like systems, or from the standard distribution site. When processed by import_locations() a [Zone(None, None, "AN", "America/Curacao", None), Zone(None, None, "AO", "Africa/Luanda", None), Zone(None, None, "AO", "Antartica/McMurdo", ["McMurdo Station", "Ross Island"])] >>> zones = Zones(open("timezones")) >>> for value in sorted(zones, ... key=lambda x: x.zone): ... print(value) Africa/Luanda (AO: 08°48'00"S, 013°14'00"E) America/Curacao (AN: 12°11'00"N, 069°00'00"W) Antarctica/McMurdo (AQ: 77°50'00"S, 166°36'00"E also McMurdo Station, Ross Island)
|
Generate a zoneinfo compatible zone description table >>> zones = Zones(open("timezones")) >>> Zones.dump_zone_file(zones) ['AN\t+121100-0690000\tAmerica/Curacao', 'AO\t-084800+0131400\tAfrica/Luanda', 'AQ\t-775000+1663600\tAntarctica/McMurdo\tMcMurdo Station, Ross Island']
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue May 20 12:41:47 2008 | http://epydoc.sourceforge.net |