59 releases

0.1.61 Sep 16, 2024
0.1.60 Feb 3, 2024
0.1.59 Dec 30, 2023
0.1.58 Oct 17, 2023
0.1.1 Jun 27, 2020

#3 in Date and time

Download history 1811730/week @ 2024-08-04 1859728/week @ 2024-08-11 1908601/week @ 2024-08-18 1906577/week @ 2024-08-25 1817842/week @ 2024-09-01 1866950/week @ 2024-09-08 1835700/week @ 2024-09-15 2000676/week @ 2024-09-22 2014668/week @ 2024-09-29 2066439/week @ 2024-10-06 2059703/week @ 2024-10-13 2106820/week @ 2024-10-20 2008547/week @ 2024-10-27 2068324/week @ 2024-11-03 2067642/week @ 2024-11-10 2089381/week @ 2024-11-17

8,358,874 downloads per month
Used in 7,869 crates (18 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–4.5MB