Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
2.9.1
-
None
-
None
-
Linux.
Description
I got an instance of XSDateTime (which you would normally get through PSVI DOM).
I was expecting to be able to use the javax.xml.datatype.XMLGregorianCalendar.compare(XMLGregorianCalendar) to determine if dates are comparable as per the spec, but it goes wrong. This appears to be because the result of org.apache.xerces.xs.datatypes.XSDateTime.getXMLGregorianCalendar() doesn't reflect whether the time zone was actually specified.
See http://www.w3.org/TR/xmlschema-2/#dateTime-order
I'll attach a test case shortly.