-
Notifications
You must be signed in to change notification settings - Fork 116
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
Date and time serialization are very inconsistent #309
Comments
Due to this module being changed over time by bunch of different contributors, without clear owner (after initial version), there are indeed many inconsistencies. But because of (backwards-)compatibility limitations changes need to be done carefully and incrementally. Given above, this issue is not quite something that can be worked as-is, since its scope is wider than what individual PRs could tackle. It'd be great to create a set of "smaller" issues instead, ones that focused on one specific date/time type or configuration feature. |
To solve that problem, I have written a dedicated module(https://github.com/fbacchella/LogHub/blob/no_axibase/loghub-core/src/main/java/com/axibase/date/JacksonModule.java). By loading it after the JavaTimeModule, it hides the problematic serializers. |
@fbacchella Thank you for sharing this. |
I’m comparing results of different time object serialization with different settings and the result are very different.
I wrote the following code
The output is
I don’t think the output should depend of the class used, except for the precision. And many are plain wrong, where many features are not really applied. For example with
WRITE_DATES_WITH_CONTEXT_TIME_ZONE
, even Instant should not be serialized az UTC, but indeed with the context time zone.The text was updated successfully, but these errors were encountered: