Skip to main content

parse_timezone

Function parse_timezone 

Source
pub fn parse_timezone(input: &str) -> Result<TzOffset>
Expand description

Parse a timezone string and return the offset.

Supports:

  • Abbreviations: “UTC”, “PST”, “JST”, etc.
  • IANA names: “Asia/Shanghai”, “America/New_York”
  • Numeric offsets: “+0800”, “+08:00”, “-07:00”, “+08”, “Z”