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
Allow OffsetDateTime to be parsed from a Double value #457
Comments
Try to investigate how it worked before, and send a Pull Request that supports that format too. |
Before I merge that, I need to understand how did you manage to get an I'm not aware of any Java Date/Time class whose Is that something that a custom library generates from an |
As per my understanding, versions < 2.14.1 converted OffsetDateTime types to double value. Starting 2.14.1, the value started being stored as a readable date string. Does it have to do with this change? |
@shantanu-93 No, according to Git history, the Your change tries to parse the
But, why? Is your JSON object containing epoch data? In that case, you can supply your own |
@vladmihalcea, I think class OffsetDateTimeSerializer added in 2.14.1 changed how OffsetDateTime types are handled. I verified that up until 2.14.0, this type in a json field is converted to a double value in the types library at this point. See this change. |
@shantanu-93 I've just commented out this block:
and, I run the
So, I'm not sure how it could have worked before. Try to investigate it, but I don't see how that double value could be generated. |
After adding the dependency:
I could, indeed, replicate the issue you mentioned.
I'll integrate it for 2.17.1. |
Fixed. |
In version 2.14.1, changes to handlling of OffsetDateTime type values was introduced to persist timezone. Earlier, OffsetDateTime type values were converted to a double type for storage and converted back to OffsetDateTime type on retrieval.
The earlier versions also were able to retrieve values stored as OffsetDateTime strings. Starting v2.14.1, during retrieval, the double type values are not parsed by the library and throw a DateTimeParseException.
The text was updated successfully, but these errors were encountered: