Expand description
This is a library for parsing zoneinfo files.
§Example
use std::fs::File;
use std::io::Read;
use std::path::Path;
use tz::parse;
let path = Path::new("/etc/localtime");
let mut contents = Vec::new();
File::open(path).unwrap().read_to_end(&mut contents).unwrap();
let tz = parse(contents).unwrap();
for t in tz.transitions {
println!("{:?}", t);
}
Re-exports§
pub use internals::Result;
Modules§
- internals
- Bare structures of time zone files
Structs§
- Leap
Second - A leap second specification.
- Local
Time Type - A description of the local time in a particular timezone, during the period in which the clocks do not change.
- TZData
- Parsed, interpreted contents of a zoneinfo file.
- Transition
- A time change specification.
Enums§
- Transition
Type - The ‘type’ of time that the change was announced in.