This small utility crate gets get the IANA time zone for the current system. This is also known the tz database, tzdata, the zoneinfo database and, the Olson database.
Example:
extern crate iana_time_zone;
println!("current: {}", iana_time_zone::get_timezone().unwrap());
You can test this is working on your platform with:
cargo test -- --nocapture
This crate has a minimum supported rust version (MSRV) of 1.59. 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.
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.