74 releases

0.7.3 Dec 11, 2025
0.7.2 Sep 15, 2024
0.6.1 Dec 30, 2023
0.5.7 May 11, 2023
0.2.1 Mar 27, 2022

#27 in Date and time

Download history 154194/week @ 2026-04-16 171390/week @ 2026-04-23 152540/week @ 2026-04-30 152887/week @ 2026-05-07 168980/week @ 2026-05-14 147514/week @ 2026-05-21 170404/week @ 2026-05-28 157985/week @ 2026-06-04 161710/week @ 2026-06-11 189865/week @ 2026-06-18 185059/week @ 2026-06-25 184836/week @ 2026-07-02 178051/week @ 2026-07-09 183868/week @ 2026-07-16 194667/week @ 2026-07-23 183655/week @ 2026-07-30

772,446 downloads per month
Used in 140 crates (10 directly)

Apache-2.0

2MB
40K SLoC

tzdb — Time Zone Database

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

Static time zone information for tz-rs.

This crate provides all time zones found in the Time Zone Database.

Usage examples

let time_zone = tzdb::local_tz()?;       // tz::TimeZoneRef<'_>
let current_time = tzdb::now::local()?;  // tz::DateTime

// access by identifier
let time_zone = tzdb::time_zone::europe::KYIV;
let current_time = tzdb::now::in_tz(tzdb::time_zone::europe::KYIV)?;

// access by name
let time_zone = tzdb::tz_by_name("Europe/Berlin")?;
let current_time = tzdb::now::in_named("Europe/Berlin")?;

// names are case insensitive
let time_zone = tzdb::tz_by_name("ArCtIc/LongYeArByEn")?;
let current_time = tzdb::now::in_named("ArCtIc/LoNgYeArByEn")?;

// provide a default time zone
let current_time = tzdb::now::local_or(tzdb::time_zone::GMT)?;
let current_time = tzdb::now::in_named_or(tzdb::time_zone::GMT, "Some/City")?;

Feature flags

  • local (enabled by default) — enable functions to query the current system time
  • now (enabled by default) — enable functions to query the current system time
  • std (enabled by default, now and local) — enable the use of features in the std crate
  • alloc (enabled by std) — enable the use of features in the alloc crate

Dependencies

~235–730KB
~14K SLoC