Skip to main content

parse_timestamp_flexible

Function parse_timestamp_flexible 

Source
pub fn parse_timestamp_flexible(
    s: &str,
) -> Result<DateTime<FixedOffset>, ProjectionError>
Expand description

Parse a timestamp accepting either RFC3339 (with timezone) or a naive ISO 8601 datetime without timezone. Naive datetimes are interpreted as the host’s local timezone and returned with that offset attached, so downstream code always works on DateTime<FixedOffset> with explicit timezone information.