Sunbeam Studios

Our open-source projects, here for you!

iana-time-zone (0.1.65)

Published 2026-03-26 10:59:16 +00:00 by siennathesane

Installation

[registry]
default = "gitea"

[registries.gitea]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add iana-time-zone@0.1.65

About this package

get the IANA time zone for the current system

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

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

ID Version
chrono-tz ^0.10.1
getrandom ^0.2.1
js-sys ^0.3.66
log ^0.4.14
wasm-bindgen ^0.2.89
getrandom ^0.2.1
wasm-bindgen-test ^0.3.46
android_system_properties ^0.1.5
iana-time-zone-haiku ^0.1.1
windows-core >=0.56, <=0.62
core-foundation-sys ^0.8.6

Keywords

IANA time
Details
Cargo
2026-03-26 10:59:16 +00:00
0
Andrew Straw <strawman@astraw.com>
René Kijewski <rene.kijewski@fu-berlin.de>
Ryan Lopopolo <rjl@hyperbo.la>
MIT OR Apache-2.0
30 KiB
Assets (1)
Versions (1) View all
0.1.65 2026-03-26