Skip to main content

parse_timestamp

Function parse_timestamp 

Source
pub fn parse_timestamp(
    value: &Value,
    field_name: &str,
) -> Result<OffsetDateTime, ClaimsError>
Expand description

Helper to parse timestamp (seconds since epoch) into OffsetDateTime.

ยงErrors

Returns ClaimsError::InvalidClaimFormat if the value is not a valid unix timestamp.