Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
According to the documentation PutSQL should be able to manage nanoseconds:
".]sql.args.N.format [...] as specified according to java.time.format.DateTimeFormatter"
DateTimeFormatter should be able to manage nanoseconds.
The issue seems to be happening in JdbcCommon.java
Line 840-843:
final DateTimeFormatter dtFormatter = getDateTimeFormatter(valueFormat);
TemporalAccessor accessor = dtFormatter.parse(parameterValue);
java.util.Date parsedDate = java.util.Date.from(Instant.from(accessor));
lTimestamp = parsedDate.getTime();
It seems to be truncated on line 842
java.util.Date parsedDate = java.util.Date.from(Instant.from(accessor));
as java.util.Date doesn't handle nanoseconds. A Java time construct that can handle nanoseconds should be used instead of Date.