Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JiBX 1.1.5
-
Fix Version/s: JiBX 1.1.6
-
Component/s: core
-
Labels:None
-
Environment:n/a
-
Number of attachments :
Description
Hi,
The validateDate() function in org.jibx.runtime.Utility is used to
validate dates in XSD date format. But it doesn't handle date strings with
timezones, for example "2008-04-08Z", even though the timezone is part of
the XSD date format specification.
The biggest problem is that validateDate() doesn't just ignore the
timezone, but that it considers a date with timezone invalid. This makes
it unusable with the default axis2 databinding, which apppends a timezone
to date values.
Cheers,
Jochem
Changed the code to accept the timezone information, but ignore it. That's probably the best approach to take when using Java Date types. Future code may make use of XmlGregorianCalendar or something similar to allow Java representations more directly equivalent to the schema format.