[tz] Recommendations for stable list of timezone ids

Paul.Koning at dell.com Paul.Koning at dell.com
Fri Feb 9 18:26:15 UTC 2018



> On Feb 9, 2018, at 1:23 PM, Paul Koning <paul.koning at dell.com> wrote:
> 
> 
> 
>> On Feb 9, 2018, at 7:44 AM, Tobias Lindaaker <thobes at gmail.com> wrote:
>> 
>> I am trying to compile a flat list of all tzids in the Time Zone Database in a way such that the position of a tzid remains the same in the list even in the face of future changes to the Time Zone Database.
> 
> Isn't this already in place?  Timezones are identified by <continent>/<city>.  While the primary name for a zone may change, for example if the "best known" spelling of the city changes, the previous name in such cases is preserved as a link.
> 
> So you can read the current tzdata to find all the names.  Those that aren't links are today's TZ identifiers.  In the future, if a new name shows up, it's either a renamed zone (if a previously known zone name is now a link to that new name) or a newly defined zone (if no such link exists).
> 
> If that isn't sufficient, what's missing?

Oh, I missed something.  You want them sorted and for the positions to remain fixed.  That's clearly not possible.  And why do you need that?  The strings are stable identifiers as I described.  If you don't like keying lots of records by strings, which is reasonable, you can create an auxiliary table that maps the strings into small integers which are then used in the other tables.  You can do all this today.

	paul



More information about the tz mailing list