Creating a user-friendly list of timezones for user-preferences

Below is a snippet of the list of timezones returned from java (I've printed the timezone offset, timezone ID, and long name, using JodaTime).

(GMT-10:00) HST, Hawaii Standard Time     
(GMT-10:00) Pacific/Apia, -10:00
(GMT-10:00) Pacific/Fakaofo, Tokelau Time
(GMT-10:00) Pacific/Honolulu, Hawaii Standard Time
(GMT-10:00) Pacific/Johnston, Hawaii Standard Time

What is the difference between HST, Pacific/Honolulu, and Pacific/Johnston, for example? They all seem to use Hawaii Standard Time, why are there 3 entries in the database?

  • My ultimate goal is to just create a list of timezones for user preferences in a web app.

If I use all of the timezones from the tzDatabase the list is long and appears to have effective duplicates (example above). I could just list unique long-form-names such as "Hawaii Standard Time", but then I need to decide how to map it to any one of the timezones that use that same long name.

What do other people do in this case? How do you create a nice user-friendly list of timezones and map them to their relevant java TimeZone?

21
задан David Parks 23 November 2010 в 09:13
поделиться