icu4x
icu4x copied to clipboard
Tracking Issue: Package IANA TZDB for ICU4X
Tracks progress on issues related to generating TZDB data for
- #887
- [ ] TimeZone DataBase
- #1008
- #1009
Discussion:
- @nekevss Probably we'd have a provider that sits on top of a TZDB cache that had read data from jiff, OS, or other source. So where do you think this should live?
- @robertbastian When you say "reading data from jiff", we want to ship our own data, right? Jiff ships its own data. ICU4X's value proposition is processing data so I don't really want to rely on some other crate for it.
- @robertbastian The crate
chronotzships its own data and has its own parser. It parses from text files. They have their own logic to get the tables. Maybe we could add functionality to their crate. Getting the Tzif files is hard. - @sffc Originally I wanted to handle TZDB in ICU4X but there are several other crates in the Rust ecosystem for handling dates and times and maybe I don't want to take ownership of that
- @robertbastian I tried using
chronofor time zones but it's a pain to get updates, etc. ICU4X's data provider solution would be really nice for time zones. - @nekevss Jiff doesn't want to export its tzdb. Chrono has a crate but it's a pain to use. There was some interest on making a standalone tzdb crate.
-
- @robertbastian - what is the actual data we need? are we going to provide datetime arithmetic and essentially become an alternative to jiff/chrono/etc? if we do that we should use our own data, otherwise clients can just use the other crates to begin with.
- @sffc We have enough data now to calculate offsets, time zone IDs, and metazones. But we don't have a way to calculate zone variants. If we had a data provider that mapped from "time zone ID + offset" to zone variant (PST vs PDT) then we would have enough for formatting.
- @robertbastian Where would we source that data? It would be cool if CLDR had enough data to do formatting and if TZDB would be required only for time zone arithmetic.
Jiff ships its own data
Only as a fallback when tzdb (e.g., at /usr/share/zoneinfo) isn't accessible. Basically, Unix is the only platform where /usr/share/zoneinfo is reliably available.