Skip to main content

parse_betfair_timestamp

Function parse_betfair_timestamp 

Source
pub fn parse_betfair_timestamp(s: &str) -> Result<UnixNanos>
Expand description

Parses an RFC 3339 / ISO 8601 timestamp string into [UnixNanos].

Handles both UTC ("2023-11-27T05:43:00Z") and offset ("2021-03-19T12:07:00+10:00") formats.

§Errors

Returns an error if the string is not a valid RFC 3339 datetime.

§Panics

Panics if the parsed datetime cannot be represented as nanoseconds.