Skip to main content

parse_tz_offset

Function parse_tz_offset 

Source
pub fn parse_tz_offset(value: &str) -> Option<i64>
Expand description

Parse a timezone token into seconds east of UTC. Only git’s canonical <+|->HHMM form is accepted: exactly five bytes, sign first, then four ASCII digits, with hours at most 23 and minutes at most 59 (the bounds of git’s date.c match_tz). Returns None otherwise.