On Tue, 2019-02-26 at 11:06 -0800, Guy Harris wrote:
Have you ever had one of them say "I'm in Beijing, but you're only offering me Shanghai"?
Not yet, though I imagine it's just a matter of time. :)
Nothing obliges you to use the tzdb identifiers rather than, say, names that might not require knowing how tzdb region IDs are chosen, e.g. "China" as the name for Asia/Shanghai (and something else, such as Xinjiang or Urumqi, for Xinjiang time),
That is, unless you are an ethnic Han living in the Western Regions, in which case you probably want Asia/Shanghai after all. 'Automatic location detection' does not address that case well either. My basic take is this: civil timekeeping is quite complex enough as it is, without the arbitrary interposition of yet more layers of indirection in the zone indexing. In many (perhaps most?) applications, such indirection may be a necessary evil. However, anything that increases the overall global complexity of a system imposes a 'tax' of its own (both in system resources and in the ease with which the system can be modeled and understood in a programmers head). It's well to consider this cost in the overall context of the intended use case, platform capabilities and intended user audience. To issue a categorical imperative like 'tzdb identifiers should *never* be shown to users' is to short-circuit this entire delicate design process of weighing tradeoffs. Cheers! |---------------------------------------------------------------------| | Frederick F. Gleason, Jr. | Chief Developer | | | Paravel Systems | |---------------------------------------------------------------------| | But in our enthusiasm, we could not resist a radical overhaul of | | the system, in which all of its major weaknesses have been exposed, | | analyzed, and replaced with new weaknesses. | | | | -- Bruce Leverett | | "Register Allocation in Optimizing Compilers" | |---------------------------------------------------------------------|