63 releases
| 0.1.65 | Jan 28, 2026 |
|---|---|
| 0.1.64 | Sep 12, 2025 |
| 0.1.63 | Mar 31, 2025 |
| 0.1.61 | Sep 16, 2024 |
| 0.1.1 | Jun 27, 2020 |
#4 in Date and time
26,827,359 downloads per month
Used in 13,975 crates
(37 directly)
120KB
3K
SLoC
iana-time-zone - get the IANA time zone for the current system
This small utility crate gets the IANA time zone for the current system. This is also known as the tz database, tzdata, the zoneinfo database, and the Olson database.
Example:
// Get the current time zone as a string.
let tz_str = iana_time_zone::get_timezone()?;
println!("The current time zone is: {}", tz_str);
You can test this is working on your platform with:
cargo run --example get_timezone
Minimum supported rust version policy
This crate has a minimum supported rust version (MSRV) of 1.62.0 for Tier 1 platforms.
Updates to the MSRV are sometimes necessary due to the MSRV of dependencies. MSRV updates will not be indicated as a breaking change to the semver version.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~0–360KB