[tz] Single source of truth for timezone data

enh enh at google.com
Wed Dec 7 15:54:42 UTC 2022


On Wed, Dec 7, 2022 at 3:38 AM Almaz Mingaleev via tz <tz at iana.org> wrote:

> Does that mean that libc APIs will behave differently from whatever
> is using ICU files?
>

yes, this is already true, and...


> On Android we are waiting for ICU/CLDR patches because we offer
> libc, ICU, and several Java APIs.
>

...exactly the reason Android does this :-)

(we learned this the hard way a decade ago when we updated tzdata but not
icu, and the results of date formatting suddenly depended on which API you
used :-( in a sense it doesn't matter --- 99.999% of dates/times a *user*
sees on Android have come from icu rather than libc, but that also means
that updating tzdata without icu is not as useful as you might otherwise
imagine.)


> I believe Apple also waits for ICU/CLDR patches, though I do not know
> their reasons.
>

i'm not aware of *any* libc that uses icu (or cldr data directly) for
this[1], so everyone's in the same boat.

____
1. "this" being specifically just the time/date stuff. note that bionic
does, for example, defer to icu for all the iswprint() and wcwidth() type
stuff. i wanted to do the same for iconv() but never worked out how to
bridge the API gap between that and icu. i've never tried with the
date/time stuff, and i'm not aware that anyone else has, so if anyone has
implementation experience there, i'd love to hear it!


> On Fri, 2 Dec 2022 at 17:25, Benjamin Drung via tz <tz at iana.org> wrote:
>
>> Hi everyone,
>>
>> I am writing this mail with my distribution maintainer hat on since I am
>> responsible for keeping the tzdata package up-to-date in Ubuntu. I like
>> to propose to have a single source of truth for timezone data, which
>> should be the tzdata source package. Updating this package in a
>> distribution like Debian/Ubuntu should be enough to update all consumers
>> in the distribution.
>>
>> 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 from
>> https://github.com/unicode-org/icu-data to the tzdata source package.
>> Then it uses genrb and icupkg to generate the .res files. Since the icu
>> project lacks behind the tzdata release by hours up to days, Ubuntu has
>> to update tzdata twice (first the tzdata release, then the icu update).
>>
>> 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.
>>
>> Can tzdata include the necessary data and tools to generate
>> metaZones.xml from its source? Then it would be possible to generate the
>> icu data from the tzdata source without the need to wait for icu to
>> catch up. Then Debian/Ubuntu can ship a tzdata-icu package for it [1].
>>
>> [1] https://bugs.debian.org/954112
>>
>> --
>> Benjamin Drung
>> Debian & Ubuntu Developer
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mm.icann.org/pipermail/tz/attachments/20221207/482beb71/attachment.html>


More information about the tz mailing list