/// Parse transition rule time with TZ string extensions
Parse transition rule time with TZ string extensions
Parse transition rule time with TZ string extensions
fn parse_rule_time_extended(cursor: &mut Cursor) -> Result<i32, Error> {
    let (sign, hour, minute, second) = parse_signed_hhmmss(cursor)?;
    if hour < -167 || hour > 167 {
        return Err(Error::InvalidTzString("invalid day time hour"));
    }
    if minute < 0 || minute > 59 {
        return Err(Error::InvalidTzString("invalid day time minute"));
    }
    if second < 0 || second > 59 {
        return Err(Error::InvalidTzString("invalid day time second"));
    }
    Ok(sign * (hour * 3600 + minute * 60 + second))
}
fn parse_rule_time_extended ( cursor : & mut Cursor ) -> Result < i32 , Error > { let ( sign , hour , minute , second ) = parse_signed_hhmmss ( cursor ) ? ; if hour < - 167 || hour > 167 { return Err ( Error :: InvalidTzString ( " " ) ) ; } if minute < 0 || minute > 59 { return Err ( Error :: InvalidTzString ( " " ) ) ; } if second < 0 || second > 59 { return Err ( Error :: InvalidTzString ( " " ) ) ; } Ok ( sign * ( hour * 3600 + minute * 60 + second ) ) }
Parse transition rule time with TZ string extensions
Parse transition rule time with TZ string extensions
cursor
&mut Cursor