[tz] Single source of truth for timezone data

Guy Harris gharris at sonic.net
Sat Dec 3 03:36:29 UTC 2022

On Dec 1, 2022, at 5:45 AM, Benjamin Drung via tz <tz at iana.org> wrote:

> Sadly this is currently not the case. Ubuntu since 20.04 (focal) adds
> the four icu source files metaZones.txt, timezoneTypes.txt, windowsZones.txt, and zoneinfo64.txt

Those aren't part of CLDR, those are part of icu-data, and I've no idea what the heck they are.

> metaZones.txt, timezoneTypes.txt, and windowsZones.txt are generated
> using tools/cldr/cldr-to-icu/build-icu-data.xml from
> https://github.com/unicode-org/icu. zoneinfo64.txt is generated by
> tz2icu. build-icu-data.xml uses https://github.com/unicode-org/cldr as
> input to convert the cldr data to icu. If I saw that correctly, only
> common/supplemental/metaZones.xml needs to be updated there on an
> update.

That would be good, as that would mean that those icu-data files would Not Be Our Problem.

> Can tzdata include the necessary data and tools to generate
> metaZones.xml

*That's* from CLDR

> from its source?

A "metazone" name appears to be an key in maps from metazone names to sets of "time zone" names, e.g. the map common/main/en.xml in CLDR-28 maps "Europe_Western" to "long" names:

	a "generic" name "Western European Time";

	a "standard" name "Western European Standard Time";

	a "daylight" name "Western European Summer Time";

and the "timeZoneNames" map in common/main/es_US.xml in CLDR-28 maps "America_Central" to "short" names:

	a "generic" name "CT;

	a "standard" name "CST";

	a "daylight" name "CDT";

so it'a somewhat like the result of combining the FORMAT field in a Zone line with the LETTER/S field of a Rule line, except that it's locale-specific, unlike the FORMAT+LETTER/S time zone abbreviation we provide.

In addition, the time zone abbreviation is required by POSIX, while the "long name" isn't.

It Might Be Nice if we could assist in associating specific Zone-line+Rule-line combinations with metazones, but that might require us to know things about locales, not just about time zones, which would require us to know things that I think are clearly not in our scope.

More information about the tz mailing list