Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.9.1
-
None
Description
XSDateTime.getXMLGregorianCalendar() loses precision for fractional digits and inserts timezones where there are none. We need to be careful when converting a double to a BigDecimal. The naive approach "new BigDecimal(doubleValue - ((int) doubleValue))" doesn't work. Also need to check that the XSDateTime has a timezone. If it doesn't we should specify DatatypeConstants.FIELD_UNDEFINED as the value not zero.