#timezone #windows #unicode #list #convert #cldr #tz

no-std bin+lib windows-timezones

Windows timezone list from the Unicode CLDR project

6 releases

0.3.1 Apr 18, 2024
0.3.0 Jul 7, 2023
0.2.1 Jul 4, 2023
0.1.1 Apr 12, 2023
0.1.0 Feb 7, 2023

#154 in Date and time

Download history 35/week @ 2024-01-04 35/week @ 2024-01-11 37/week @ 2024-01-18 37/week @ 2024-01-25 34/week @ 2024-02-01 41/week @ 2024-02-08 55/week @ 2024-02-15 56/week @ 2024-02-22 69/week @ 2024-02-29 82/week @ 2024-03-07 80/week @ 2024-03-14 49/week @ 2024-03-21 64/week @ 2024-03-28 183/week @ 2024-04-04 67/week @ 2024-04-11 179/week @ 2024-04-18

500 downloads per month

(MIT OR Apache-2.0) AND Unicode-DFS-2016

120KB
2K SLoC

Windows Timezones

github crates.io docs.rs

This crate takes the list of Windows' (the OS) default timezones[^1] 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.

SQLx support

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!

Features

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

[^1]: See the official Windows documentation. Note that the CLDR list is more up-to-date than the actual Windows documentation page.

Dependencies

~0–11MB
~117K SLoC