tzdb — Time Zone Database
Static time zone information for tz-rs.
This crate provides all time zones found in the Time Zone Database.
Usage examples
let time_zone = local_tz?; // tz::TimeZoneRef<'_>
let current_time = local?; // tz::DateTime
// access by identifier
let time_zone = KYIV;
let current_time = in_tz?;
// access by name
let time_zone = tz_by_name?;
let current_time = in_named?;
// names are case insensitive
let time_zone = tz_by_name?;
let current_time = in_named?;
// provide a default time zone
let current_time = local_or?;
let current_time = in_named_or?;
Feature flags
local(enabled by default) — enable functions to query the current system timenow(enabled by default) — enable functions to query the current system timestd(enabled by default,nowandlocal) — enable the use of features in thestdcratealloc(enabled bystd) — enable the use of features in thealloccrate