tzdb_data

Function find_tz

Source
pub const fn find_tz(s: &[u8]) -> Option<&'static TimeZoneRef<'static>>
Expand description

Find a time zone by name, e.g. b"Europe/Berlin" (case-insensitive)

ยงExample

assert_eq!(
    &tzdb_data::time_zone::europe::BERLIN,
    tzdb_data::find_tz(b"Europe/Berlin").unwrap(),
);