Crate tz [] [src]

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 transitions = parse(contents).unwrap();

for t in transitions {
    println!("{:?}", t);
}

Modules

internals

Bare structures of time zone files

Structs

LeapSecond

A leap second specification.

LocalTimeType

A description of the local time in a particular timezone, during the period in which the clocks do not change.

Transition

A time change specification.

Enums

TransitionType

The 'type' of time that the change was announced in.

Functions

cook

Convert the internal time zone data into a list of transitions.

parse