-
Notifications
You must be signed in to change notification settings - Fork 81
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
DateTime serialization result is not same as Java 8 ZonedDateTime #92
Comments
So would the expectation here to use and include original timezone offset? |
@cowtowncoder Yes, I think |
Still not 100% what to do here for 2.9. I agree that ideally outputs should match, and further that without explicit configuration, default should be to use existing timezone in values that have it. |
Is this solved? |
Bump please solve this :-) What I don't understand is why there is no configuration for that. By the way this bug is a breaker for me too, I need to keep timezones with different values, which work with Java8 but not with Joda. The whole problem seems to be related to a wrong implementation of |
I think the problem happens with So basically we need to have a default Here's a POJO example that outputs correct TimeZone. class Foo {
@JsonFormat(timezone = ZONE_ID)
DateTime dateTime;
} |
that is exactly why I suggested a new SerializationFeature for this, so other cases would not be broken but developers, who need the un-destroyed timezone information, can use joda again. Plus it would be more consistent, to have corresponding switches for serialization and deserialization. If I'm not mistaken the problem was introduced with SerializationFeature.WRITE_DATES_WITH_ZONE_ID in the first place, and the timezone information was kept intact correctly before that? That was a breaking change back then as well, wasn't it? |
@Flomix What I really love about users is the deep sense of entitlement for fixes, just by demanding that someone else should go fix things because they say so. Especially this comment: "Such a bug shouldn't be open for 2 years." makes me very, very uninterested in working with you at all. |
Version: 2.8.8
Below is the test code:
ZonedDateTime
result is"2017-01-01T01:01:01+08:00"
while
DateTime
result is"2016-12-31T17:01:01.000Z"
, which is convert to UTC timezone.The text was updated successfully, but these errors were encountered: