[tz] Getting offset for each time zones

Guy Harris guy at alum.mit.edu
Wed May 18 19:31:28 UTC 2016


On May 18, 2016, at 8:58 AM, Matt Johnson <mj1856 at hotmail.com> wrote:

> I'll also add that time zone selection is indeed a challenging problem, and there are alternative approaches to consider.  These include map-based time zone pickers, lat/lon lookup via shapefiles, type-ahead style selection of associated cities (which requires even more data), multiple dropdowns used in succession, and others.  Since most implementations don't make this easy, it's common to see a single dropdown with a long list of all TZ identifiers - even though that's not the recommended.  You may want to spend some time looking at how various platforms differ in how they ask users to pick a time zone (mac vs linux vs windows), as well as web sites and applications such as Google Calendar.   You may even want to try doing it in some language other than English to see what kind of differences there are.  You'll find quite a lot of variation indeed.
> 
> In general, I don't think the world has settled on a single right way for a user to pick a time zone.

...but Apple have done the best job I've seen so far for general-purpose OSes.  ("General-purpose OSes" meaning "some small embedded device probably can't do as much fancy UI stuff".)

The OS X time zone selector combines:

	lat/lon lookup via shapefiles for the "Set time zone automatically using current location" feature;

	a map-based time zone picker (presumably using the same shapefiles);

	type-ahead style selection of associated cities.

iOS has the first and third of those (although it just calls the auto-select feature "Set Automatically").

I don't have Windows 10 handy to try it.

Linux (and other OSes using free-software desktops) doesn't have a single desktop environment and thus doesn't have a single time zone selector, but I don't remember seeing anything as good as OS X has on either KDE or GNOME, although it might have gotten better since I last checked.  I don't know what Android has, but I suspect, given that it's mostly used on small mobile devices, it supports "set automatically".


More information about the tz mailing list