Skip to main content

parse_time

Function parse_time 

Source
pub fn parse_time(s: &str) -> Option<(i64, i32)>
Expand description

time('21:40:32.142+01:00') – a time-of-day with a required offset. Returns None if the string has no offset at all, or if it carries a bracketed named-zone suffix ([Europe/Stockholm]) – the caller (Executor::call_builtin’s "time" arm) checks for [ itself first and raises a specific “named zones aren’t supported” error rather than this generic parse failure, but this function still refuses to silently ignore/misparse the bracket if called directly.