1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Rust library for reading the text files comprising the [zoneinfo
//! database][w], 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][zc] instead.
//!
//! The database itself is maintained by IANA. For more information, see
//! [IANA’s page on the time zone database][iana]. You can also find the text
//! files themselves in [the tz repository][tz].
//!
//! [iana]: https://www.iana.org/time-zones
//! [tz]: https://github.com/eggert/tz
//! [w]: https://en.wikipedia.org/wiki/Tz_database
//! [zc]: https://github.com/rust-datetime/zoneinfo-compiled
//!
//! ## Outline
//!
//! Reading a zoneinfo text file is split into three stages:
//!
//! - **Parsing** individual lines of text into `Lines` is done by the `line`
//! module;
//! - **Interpreting** these lines into a complete `Table` is done by the
//! `table` module;
//! - **Calculating transitions** from this table is done by the `transitions`
//! module.
extern crate datetime;
extern crate regex;
extern crate lazy_static;