time-tz
An implementation of the tz database for the time-rs Rust crate.
This implementation is based off of chrono-tz (https://github.com/chronotope/chrono-tz) but uses time-rs instead of chrono. This is designed to replace use of chono dependency which is impacted by CVE-2020-26235 (localtime_r thread safety issue linked to std::env::set_var).
Features
- Injects an
assume_timezone
member function to anyPrimitiveDateTime
. - Injects a
to_timezone
member function to anyOffsetDateTime
. - Provides a
timezones::get_by_name
function to get a timezone by name. - Supports finding the closest IANA match from a windows timezone name.
- Supports obtaining system's current timezone (through the
system
feature).
Usage
use datetime;
use ;