NAME
Punk::SAML::Time - xs:dateTime, both ways
DESCRIPTION
Parses and formats the timestamps SAML compares - NotBefore, NotOnOrAfter, IssueInstant, AuthnInstant - in UTC.
Accepted: [-]YYYY-MM-DDThh:mm:ss[.fraction][Z|(+|-)hh:mm]. The fraction is parsed and discarded: assertion lifetimes are minutes, and carrying sub-second precision would only invite a rounding difference between the two sides of a comparison.
Refused, each with code bad_datetime:
a missing timezone.
xs:dateTimepermits one and calls the value local, which is not a thing a protocol timestamp may be, and Core section 1.3.3 requires UTC24:00as an end-of-daya leap second,
ssof60. No identity provider emits one, and accepting it would mean deciding what instant it namesa date that does not exist, such as the 29th of February in a common year
Comparisons are on epoch seconds. Formatting is always UTC with a trailing Z and whole seconds: the parser accepts fractions and the writer never emits them.
AUTHOR
LNATION, <email at lnation.org>
LICENSE AND COPYRIGHT
This software is Copyright (c) 2026 by LNATION.
This is free software, licensed under the Artistic License 2.0.