android-chrono-tz
This crates provides a chrono TimeZone implementation to correctly fetch the local timezone on
Android, using the localtime_rz and mktime_z functions from Bionic.
Unlike localtime and mktime these functions are fully thread-safe. They were added in Android
15 (API level 35) so won't work in earlier Android versions. If you're using this crate in an
Android app then ensure your minSdk is set to 35 or higher.
It also provides access to arbitrary timezones from the system timezone database, by Olson ID.
This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.
Development
Install the Android NDK and cargo-ndk, e.g.:
To run tests on a connected Android device:
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributing
If you want to contribute to the project, see details of how we accept contributions.