This repository has been archived by the owner on Jan 1, 2023. It is now read-only.
Gracefully accept more than 9 digits on the seconds fraction #1
Labels
enhancement
New feature or request
In XML Schema type
xsd:time
andxsd:dateTime
can have an unlimited number of digits on the fractional seconds. For example the valueis a perfectly legal
xsd:time
value according to the XML Schema specification. However, this poses a problem when converting to Java'sOffsetDateTime
andOffsetTime
as these will only allow up to 9 digits precision on the fractional seconds.Currently parsing a value such as the one above will cause a
DateTimeParseException
.The proposal is to able to handle this situation gracefully, meaning that fractional digits after the 9th digit are simply ignored. It is believed that this truncation is always acceptable to all users of the library and is much better than throwing an exception.
The scenario is rare and therefore any solution which handles it must not have adverse performance effect on the 99.99% of date/time values which can be parsed without problems.
The text was updated successfully, but these errors were encountered: