Time zone identifiers in user interfaces
Hi, long time lurker here, finally throwing my voice into the ring. This is a follow-up to the “Time Zone City for China” thread a week ago (starting at http://mm.icann.org/pipermail/tz/2015-July/022480.html <http://mm.icann.org/pipermail/tz/2015-July/022480.html> ). What particularly caught my attention was the discussion about the use of time zone IDs in user interfaces. Paul Eggert: "The string 'Asia/Shanghai' is a tzdata-specific identifier, not intended to be visible to non-experts.” Guy Harris: "Several time zone selectors I've seen are lazily-written crap that either directly display the tzdb name or tweak it slightly by, for example, splitting it into continent and city and displaying them in a more "user-friendly" form.” Guy Harris: “> Looks like this logic is not well understood by the communities. Then we need to do a better job of explaining it to them.” Not to put too fine a point on it… Yes, there needs to be a better job done of explaining that the city names in time zone IDs should not be used in user interfaces. After reading that discussion I went looking through the tzdb files for guidance around the use of IDs in UIs. All I managed to find was this snippet in the Theory file, on line 385: This naming convention is not intended for use by inexperienced users to select TZ values by themselves (though they can of course examine and reuse existing settings). Distributors should provide documentation and/or a simple selection interface that explains the names; see the 'tzselect' program supplied with this distribution for one example. Given that the above snippet is around halfway through the file – and its wording still provides a fair bit of leeway – it’s not exactly enforcing the stronger opinions displayed on this list about how the IDs should be used. For some context, my domain knowledge is restricted to web sites/applications, so I can’t speak to the OS-level discussions in the previous thread. What I do know is how web developers deal with time zones, if they deal with them at all. For the most part, they use a library specific to their language of choice which slightly abstracts the tzdb data. There are two things these libraries have in common: 1. They use tzdb zone identifiers as the primary part of their API. 2. They don’t have any mentions in their documentation that these identifiers are not for public display. This is not me picking on time zone library authors, as I know that some of them are on this mailing list. My main point is that web developers are, for the most part, so abstracted from the tzdb source that the zone IDs are the only interface they know. Therefore the IDs are what they put in their selection UIs. There’s also the not-insignificant matter of localisation of display names (even Moment Timezone, referenced in tz-link.htm, notes in its API documentation: "Because these strings are generally localized, Moment Timezone does not provide any long names for zones.”). Personally, I didn’t know of the existence of CLDR until I started reading this mailing list. So, instead of dismissing zone-IDs-in-a-user-interface as “lazily written crap”, how about we: a) Acknowledge that most web-based UIs for picking time zones are written by developers who genuinely don’t know any better (I count my past self in this category) b) Make an effort to better educate them about recommended uses of the IDs. I am not intending for this to come across as antagonistic or facetious. I just genuinely want the quality of time zone selectors on the web to improve. Cheers, Gil
Gilmore Davidson wrote:
Given that the above snippet is around halfway through the file – and its wording still provides a fair bit of leeway – it’s not exactly enforcing the stronger opinions displayed on this list about how the IDs should be used.
We can move sections around in the file to put that snippet in the early going, and to emphasize the naming issues earlier. This entails some rewording to avoid use-before-define problems. Proposed patch attached (installed on the experimental github version). I'm not sure what is meant by "a fair bit of leeway". What would be less leeway, and why would less leeway be desirable? Can you propose some wording along those lines?
On 30 Jul 2015, at 5:18 pm, Paul Eggert <eggert@cs.ucla.edu> wrote:
We can move sections around in the file to put that snippet in the early going, and to emphasize the naming issues earlier. This entails some rewording to avoid use-before-define problems. Proposed patch attached (installed on the experimental github version).
Thanks, that looks good.
I'm not sure what is meant by "a fair bit of leeway". What would be less leeway, and why would less leeway be desirable? Can you propose some wording along those lines?
Granted, “a fair bit” was an overstatement. On reflection, I realise my issue was with the text of "(though they can of course examine and reuse existing settings)” – it seemed at odds with the main intention. I see you removed that part in your patch though, which works for me. Is it worth mentioning CLDR in that section, as a source of better display names?
participants (2)
-
Gilmore Davidson -
Paul Eggert