tzdb — Time Zone Database
Static time zone information for tz-rs.
This crate provides all time zones found in the Time Zone Database, currently in the version 2023d (released 2023-12-22).
See the documentation for a full list the the contained time zones: https://docs.rs/tzdb/latest/tzdb/time_zone/index.html
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 time