tzdb 0.3.11

Static time zone information for tz-rs
Documentation

tzdb — Time Zone Database

GitHub Workflow Status Crates.io Minimum supported Rust version: 1.55 License: Apache-2.0

Static time zone information for tz-rs.

See the documentation for a full list the the contained time zones: https://docs.rs/tzdb/latest/0.3/time_zone/index.html

Usage examples

use tz::{DateTime, TimeZone};
use tzdb::{time_zone, tz_by_name};

// access by identifier
DateTime::now(time_zone::europe::KYIV);
// access by name
DateTime::now(tz_by_name("Europe/Berlin").unwrap());
// names are case insensitive
DateTime::now(tz_by_name("ArCtIc/LongYeArByEn").unwrap());

Feature flags

  • fallback (enabled by default) — compile for unknown target platforms, too