2

We would like to convert windows time zones to OLSON time zones on our website. However the problem with OLSON time zones is that they use continents for naming instead of country names, e.g:

America/New_York
Asia/Kolkata
...

I don't think that any of our customers would expect that he/she must enter a continent name in order to find a correct time zone - and the list of time zones is much larger than that is used in windows - almost thousand. Even if a customer find out that he must enter a continent name, for example Asia then he must search in hundreds of time zones for all asia countries. That is very bad from usability point of view.

Is there any database to map OLSON/IANA time zone names to country-style names like:

America/New_York -> New York, USA
Asia/Kolkata -> Kolkata, India
user1613797
  • 1,197
  • 3
  • 18
  • 33
  • Interesting. I didn't know about this Olson tz data base. Seems you should be able to write a program to parse it and extract what you need, but it will be some work. I noticed the data desciption link is broke at https://www.iana.org/time-zones/repository/tz-link.html but this does give some similar information http://en.wikipedia.org/wiki/Tz_database – Elliptical view Dec 23 '13 at 22:02
  • possible duplicate of [How should I populate a list of IANA / Olson time zones from Noda Time?](http://stackoverflow.com/questions/13056759/how-should-i-populate-a-list-of-iana-olson-time-zones-from-noda-time) – Matt Johnson-Pint Dec 23 '13 at 22:22
  • Since you tagged your question as using Noda Time, please see the dup question link. You will see that you can either filter the list to just the country you are interested in (perhaps with two dropdowns), or you can use a map-based time zone picker to offer your users a more interactive experience. – Matt Johnson-Pint Dec 23 '13 at 22:24

1 Answers1

5

Short answer, there is no supplier for country-style names. If you want this, it is up to your efforts. Long answer: The IANA-TZDB is partitioned into regions, not countries, therefore the special form of identifiers (continent/city). From the theory file:

  • The tz database does not record a region's boundaries, and in many cases the boundaries are not known. For example, the zone America/Kentucky/Louisville represents a region around the city of Louisville, the boundaries of which are unclear.

  • Be robust in the presence of political changes. This reduces the number of updates and backward-compatibility hacks. For example, names of countries are ordinarily not used, to avoid incompatibilities when countries change their name (e.g. Zaire->Congo) or when locations change countries (e.g. Hong Kong from UK colony to China).

Many more details can be read in this file. The administrators of tzdb have expressed the wish to reduce the count of zone identifiers and to keep out all political issues away from tzdb, see especially the wild debate in september 2013 on IANA mailing list. Identifiers following country borders would often not be politically stable.

Meno Hochschild
  • 42,708
  • 7
  • 104
  • 126