My vote is on accepting Z and treat as if no tz was
given, reject all other tz - also check for compat w shib :-)
Shib defines its own XSDateTime class that internally uses the
joda-time library:
http://www.joda.org/joda-time/
The XSDateTime class does not impose any policy or rules or
validations. It only acts like a proxy to the joda-time DateTime
object. This means that Shib will parse and use any (not fully
compatible) ISO-8601 date (with or without a timezone).
+ + + +
XSDateTime.java:
https://git.shibboleth.net/view/?p=java-opensaml.git;a=blob;f=opensaml-core…
XSDateTimeImpl.java:
https://git.shibboleth.net/view/?p=java-opensaml.git;a=blob;f=opensaml-core…
formatter = ISODateTimeFormat.dateTime().withChronology(ISOChronology.getInstanceUTC());
XSDateTimeTest.java:
https://git.shibboleth.net/view/?p=java-opensaml.git;a=blob;f=opensaml-core…
+ + + +
org.joda.time.DateTime:
http://www.joda.org/joda-time/apidocs/org/joda/time/DateTime.html
org.joda.time.format.ISODateTimeFormat:
http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeForma…
Factory that creates instances of DateTimeFormatter
based on the ISO8601 standard
The class ISODateTimeFormat contains a large number of pre-defined formatters based on
the ISO-8601 specification (although not all are fully compatible). These handle many
common cases.
Note that these formatters mostly follow the ISO8601 standard for printing. For parsing,
the formatters are more lenient and allow formats that are not in strict compliance with
the standard
org.joda.time.chrono.ISOChronology:
http://www.joda.org/joda-time/apidocs/org/joda/time/chrono/ISOChronology.ht…
Implements a chronology that follows the rules of the
ISO8601 standard, which is compatible with Gregorian for all modern dates.
+ + + +
--
Ivan c00kiemon5ter Kanakarakis >:3