Crates.io | windows-timezones |
lib.rs | windows-timezones |
version | 0.4.0 |
source | src |
created_at | 2023-02-07 13:00:31.142857 |
updated_at | 2024-08-19 17:27:36.511795 |
description | Windows timezone list from the Unicode CLDR project |
homepage | |
repository | https://github.com/kyrias/windows-timezones |
max_upload_size | |
id | 778720 |
size | 148,699 |
This crate takes the list of Windows' (the OS) default timezones1 from the Unicode CLDR project's supplemental data files and converts it into a Rust enum that allows for retrieving the Windows timezone description and the corresponding default tzdb ID.
The enum variants are guaranteed to be stay consistent within the same major version of the crate.
When the sqlx
feature is enable sqlx::Type
is derived for the
WindowsTimezone
type. The supported PostgreSQL type is kept in the
schema.sql
file of this repository. On major version updates you need to
ensure that your PostgreSQL type matches the scheam.sql
file of the new
version!
chrono-tz
: Implements From<WindowsTimezone> for chrono_tz::Tz
.schemars
: Derives schemars::JsonSchema
.serde
: Derives serde::Serialize
and serde::Deserialize
.sqlx
: Derives sqlx::Type
.strum
: Derives strum::EnumIter
.See the official Windows documentation. Note that the CLDR list is more up-to-date than the actual Windows documentation page. ↩