Skip to main content

Module temporal

Module temporal 

Source
Expand description

Temporal utilities for timezone handling

Functions§

parse_rfc3339_with_timezone
Parse RFC3339 timestamp with strict timezone validation.
parse_timestamp_flexible
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.
parse_timestamp_flexible_str
Same as parse_timestamp_flexible but returns the raw error string so callers using their own error types (e.g. DetectionError) can wrap it.
validate_timezone_present
Validate that timezone information is present