Hi!

We think we found a problem in the handling of fractional seconds in GeoTools. 
The problematic code is here:
https://github.com/geotools/geotools/blob/12.0/modules/extension/xsd/xsd-core/src/main/java/org/geotools/xml/impl/XsDateTimeFormat.java#L178-L185

The above code will fail when more than 3 decimal digits are present in the 
timestamp. However some products output more (a real-life example 
"2014-10-13T05:34:02.1109963Z"), and it is in accordance with the spec:
http://www.w3.org/TR/xmlschema-2/#dateTime
and
http://en.wikipedia.org/wiki/ISO_8601#Times
"There is no limit on the number of decimal places for the decimal fraction"

Java's calendar goes only as far as one millisecond, so we'd suggest that if 
the milliseconds have more than three digits the rest are just truncated.

How does this sound?

Kind regards,
Timo Aarnio on behalf of Oskari-development team

--------------------------------
Timo Aarnio
GIS Expert
National Land Survey of Finland
Opastinsilta 12C, 00520 Helsinki
+358 50 573 9181
[email protected]
www.nls.fi

------------------------------------------------------------------------------
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to