Open
Description
Describe the bug
In src/main/java/graphql/scalars/datetime/DateTimeScalar.java
, it's incorrectly using three digits of NANO_OF_SECOND in the DateTimeFormatter. If It's a three digit fraction of a second, it should instead be MILLI_OF_SECOND.
Original:
private static DateTimeFormatter getCustomDateTimeFormatter() {
return new DateTimeFormatterBuilder()
.parseCaseInsensitive()
.append(ISO_LOCAL_DATE)
.appendLiteral('T')
.appendValue(HOUR_OF_DAY, 2)
.appendLiteral(':')
.appendValue(MINUTE_OF_HOUR, 2)
.appendLiteral(':')
.appendValue(SECOND_OF_MINUTE, 2)
.appendFraction(NANO_OF_SECOND, 3, 3, true)
.appendOffset("+HH:MM", "Z")
.toFormatter();
}
Should be:
private static DateTimeFormatter getCustomDateTimeFormatter() {
return new DateTimeFormatterBuilder()
.parseCaseInsensitive()
.append(ISO_LOCAL_DATE)
.appendLiteral('T')
.appendValue(HOUR_OF_DAY, 2)
.appendLiteral(':')
.appendValue(MINUTE_OF_HOUR, 2)
.appendLiteral(':')
.appendValue(SECOND_OF_MINUTE, 2)
.appendFraction(MILLI_OF_SECOND, 3, 3, true)
.appendOffset("+HH:MM", "Z")
.toFormatter();
}
Metadata
Metadata
Assignees
Labels
No labels