-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DateTimeSerializerBase doesn't use WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS with java.sql.Timestamp
#1499
Comments
@hadrienk Unfortunately timestamp resolution with pre-Java8 JDK types is limited to milliseconds, and as such this feature is only supported by Java 8 date/time types. This is mentioned in Javadocs. |
java.sql.Timestamp
Actually looking at javadocs for The challenge here is that of choosing proper representation. Although in theory one could simply multiply value by 1 billion, this would likely cause problems with interoperability and/or backwards compatibility. It would seem preferable to either:
I can't remember how exactly Java 8 date/time module (https://github.com/FasterXML/jackson-modules-java8) handles this, but it would probably be worth checking it out for guidance. |
Actually I should have written this bug in the java 8 data/time module. |
I am closing it, feel free to reopen it is you think it is worth a fix :) |
Actually this is the right place since |
Rethinking this again since 2.9.0 release is looming. While it would be technically possible to add this, realized that there is no separate serializer for |
When converted using DateTimeSerializerBase, java.sql.Timestamp instances are not written in nanoseconds, even if the WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS feature is enabled.
I found this error doing the following:
The text was updated successfully, but these errors were encountered: