Expand description
Rust library for reading the text files comprising the zoneinfo database, which records time zone changes and offsets across the world from multiple sources.
The zoneinfo database is distributed in one of two formats: a raw text
format with one file per continent, and a compiled binary format with one
file per time zone. This crate deals with the former; for the latter, see
the zoneinfo_compiled crate instead.
The database itself is maintained by IANA. For more information, see IANA’s page on the time zone database. You can also find the text files themselves in the tz repository.
§Outline
Reading a zoneinfo text file is split into three stages:
- Parsing individual lines of text into
Linesis done by thelinemodule; - Interpreting these lines into a complete
Tableis done by thetablemodule; - Calculating transitions from this table is done by the
transitionsmodule.
Modules§
- line
- Parsing zoneinfo data files, line-by-line.
- structure
- Determining the structure of a set of ruleset names.
- table
- Collecting parsed zoneinfo data lines into a set of time zone data.
- transitions
- Generating timespan sets from a built Table.