#iana #time

iana-time-zone

get the IANA time zone for the current system

52 releases

0.1.53 Oct 28, 2022
0.1.50 Sep 23, 2022
0.1.40 Jul 29, 2022
0.1.31 Mar 16, 2022
0.1.1 Jun 27, 2020

#6 in Date and time

Download history 548154/week @ 2022-10-18 538372/week @ 2022-10-25 569117/week @ 2022-11-01 582139/week @ 2022-11-08 562079/week @ 2022-11-15 494528/week @ 2022-11-22 579663/week @ 2022-11-29 559362/week @ 2022-12-06 533994/week @ 2022-12-13 417080/week @ 2022-12-20 321742/week @ 2022-12-27 544982/week @ 2023-01-03 608910/week @ 2023-01-10 632008/week @ 2023-01-17 656272/week @ 2023-01-24 603457/week @ 2023-01-31

2,610,185 downloads per month
Used in 2,810 crates (4 directly)

MIT/Apache

28KB
486 lines

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.38 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–430KB