Function tzdb::tz_by_name
source · pub fn tz_by_name<S>(s: S) -> Option<TimeZoneRef<'static>>where
S: AsRef<[u8]>,
Expand description
Find a time zone by name, e.g. "Europe/Berlin"
(case-insensitive)
Example
assert_eq!(
tzdb::time_zone::europe::BERLIN,
tzdb::tz_by_name("Europe/Berlin").unwrap(),
);