According to http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml, there is a one-to-many relationship from Windows timezone to 'standard' timezone name. But the importer (see https://github.com/python-babel/babel/blob/master/scripts/import_cldr.py#L234) blindly selects only the first timezone name for the map value:
>>> get_global('windows_zone_mapping')['Romance Standard Time']
'Europe/Paris'
I think get_global('windows_zone_mapping') should either return tuples with all the related timezone names:
>>> get_global('windows_zone_mapping')['Romance Standard Time']
('Europe/Paris', 'Europe/Brussels', 'Europe/Copenhagen', 'Europe/Madrid Africa/Ceuta')
or be turned around so it maps timezone name -> Windows timezone:
>>> get_global('windows_zone_mapping')['Europe/Copenhagen']
'Romance Standard Time'
I think the latter is preferable since it's a more simple data structure, and if you need the reverse mapping, it's a one-liner:
reverse_zone_map = {v: k for k, v in get_global('windows_zone_mapping').items()}
According to http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml, there is a one-to-many relationship from Windows timezone to 'standard' timezone name. But the importer (see https://github.com/python-babel/babel/blob/master/scripts/import_cldr.py#L234) blindly selects only the first timezone name for the map value:
I think
get_global('windows_zone_mapping')should either return tuples with all the related timezone names:or be turned around so it maps timezone name -> Windows timezone:
I think the latter is preferable since it's a more simple data structure, and if you need the reverse mapping, it's a one-liner: