Bug #2520
closedXML Doesn't validate: DateTime invalid
0%
Description
In our XML stream, we have tons of date fields that are now being output like so:
<observation.obsStartDate>2001-10-24 01:00:00-06</observation.obsStartDate>
but we need to make them XML conformant, i.e. like this:
<observation.obsStartDate>2001-10-24T01:00:00-06:00</observation.obsStartDate>
which matches the pattern:
\-?([1-9][0-9][0-9][0-9]+)|(0[0-9][0-9][0-9])\-(0[1-9])|(1[0-2])\-(0[1-9])([12][0-9])|(301)
T(([01][0-9])|(2[0-3]):[0-5][0-9]:([0-5][0-9])(\.[0-9]+)?)|(24:00:00(\.0+)?)
([+\-](0[0-9])|(1[0-4]):[0-5][0-9])?
as specified by w3.org:
http://www.w3.org/TR/xmlschema11-2/#dateTime
I don't know if other fields fail to validate, it's unlikely that other are wrong as other data types are more compatible.
Updated by Chad Berkley about 18 years ago
Fixed this bug in the xsl stylesheet that generates the java code for the beans. the date is now xml compliant.