[tz] Converting from individual cities/states/country names to Windows time zone names

Ian Abbott abbotti at mev.co.uk
Mon Dec 5 10:27:06 UTC 2011


On 2011/12/05 07:21 AM, Daniel White wrote:
> I'm creating a software calculator project, and I'd like my users to be able to 
> convert between time zones using what they're familiar with: country, or city/
> state names.
> 
> So I need to convert from these places to the corresponding Windows time zone, 
> and have been looking for a database online to do so, without success.
> 
> What I have been able to find is a way to convert from TZID (Olsen) to Windows 
> timezone IDs using this URL:
> http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/zone_tzid.html
> 
> So maybe there's a database which maps all the places of the world to TZID, and 
> then I would use a two-step process instead of one.
> 
> Any help would be much appreciated. When I say 'database', even just a HTML page 
> would do, and then I can extract the right info.

There's a shapefile by Eric Muller which tries to capture the boundaries
of all the tzdata timezones in the world as (spherical) polygons:

http://efele.net/maps/tz/world/

It should be fairly accurate for population centres but maybe not so
much for outback regions close to the boundaries.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk>             )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587              )=-



More information about the tz mailing list