
Retrieves system IANA time‑zone identifier as a string, exposing a tiny API for reliably resolving tz database names with faithful upstream behavior and minimal dependencies.
This is a Kotlin Multiplatform line-by-line transliteration port of strawlab/iana-time-zone.
Original Project: This port is based on strawlab/iana-time-zone. All design credit and project intent belong to the upstream authors; this repository is a faithful port to Kotlin Multiplatform with no behavioural changes intended.
This is an in-progress port. The goal is feature parity with the upstream Rust crate while providing a native Kotlin Multiplatform API. Every Kotlin file carries a // port-lint: source <path> header naming its upstream Rust counterpart so the AST-distance tool can track provenance.
The text below is reproduced and lightly edited from
https://github.com/strawlab/iana-time-zone. It is the upstream project's own description and remains under the upstream authors' authorship; links have been rewritten to absolute upstream URLs so they continue to resolve from this repository.
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
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.
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 {
implementation("io.github.kotlinmania:iana-time-zone-kotlin:0.1.1")
}./gradlew build
./gradlew testSee AGENTS.md and CLAUDE.md for translator discipline, port-lint header convention, and Rust → Kotlin idiom mapping.
This Kotlin port is distributed under the same MIT license as the upstream strawlab/iana-time-zone. See LICENSE (and any sibling LICENSE-* / NOTICE files mirrored from upstream) for the full text.
Original work copyrighted by the iana-time-zone authors.
Kotlin port: Copyright (c) 2026 Sydney Renee and The Solace Project.
Thanks to the strawlab/iana-time-zone maintainers and contributors for the original Rust implementation. This port reproduces their work in Kotlin Multiplatform; bug reports about upstream design or behavior should go to the upstream repository.
This is a Kotlin Multiplatform line-by-line transliteration port of strawlab/iana-time-zone.
Original Project: This port is based on strawlab/iana-time-zone. All design credit and project intent belong to the upstream authors; this repository is a faithful port to Kotlin Multiplatform with no behavioural changes intended.
This is an in-progress port. The goal is feature parity with the upstream Rust crate while providing a native Kotlin Multiplatform API. Every Kotlin file carries a // port-lint: source <path> header naming its upstream Rust counterpart so the AST-distance tool can track provenance.
The text below is reproduced and lightly edited from
https://github.com/strawlab/iana-time-zone. It is the upstream project's own description and remains under the upstream authors' authorship; links have been rewritten to absolute upstream URLs so they continue to resolve from this repository.
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
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.
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 {
implementation("io.github.kotlinmania:iana-time-zone-kotlin:0.1.1")
}./gradlew build
./gradlew testSee AGENTS.md and CLAUDE.md for translator discipline, port-lint header convention, and Rust → Kotlin idiom mapping.
This Kotlin port is distributed under the same MIT license as the upstream strawlab/iana-time-zone. See LICENSE (and any sibling LICENSE-* / NOTICE files mirrored from upstream) for the full text.
Original work copyrighted by the iana-time-zone authors.
Kotlin port: Copyright (c) 2026 Sydney Renee and The Solace Project.
Thanks to the strawlab/iana-time-zone maintainers and contributors for the original Rust implementation. This port reproduces their work in Kotlin Multiplatform; bug reports about upstream design or behavior should go to the upstream repository.