58 releases

0.1.60 Feb 3, 2024
0.1.59 Dec 30, 2023
0.1.58 Oct 17, 2023
0.1.57 Jun 7, 2023
0.1.1 Jun 27, 2020

#4 in Date and time

Download history 1390284/week @ 2024-01-03 1423587/week @ 2024-01-10 1523975/week @ 2024-01-17 1516749/week @ 2024-01-24 1656226/week @ 2024-01-31 1632495/week @ 2024-02-07 1667706/week @ 2024-02-14 1771066/week @ 2024-02-21 1775139/week @ 2024-02-28 1672173/week @ 2024-03-06 1619855/week @ 2024-03-13 1655850/week @ 2024-03-20 1569605/week @ 2024-03-27 1671821/week @ 2024-04-03 1682917/week @ 2024-04-10 1388273/week @ 2024-04-17

6,624,912 downloads per month
Used in 6,738 crates (14 directly)

MIT/Apache

125KB
3K SLoC

iana-time-zone - get the IANA time zone for the current system

Crates.io Documentation Crate License build

This small utility crate gets the IANA time zone for the current system. This is also known 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.48 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

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–7MB