You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The serialisation of Joda DateTime instances behaves differently in 2.6.0 vs 2.5.4 when the ObjectMapper's had its DateFormat configured. The behaviour change is illustrated by the following code:
It looks like the fix for #824 is the cause. In 2.6, the call to mapper.setDateFormat causes the ObjectMapper's time zone to be set to the JVM's default time zone. In 2.5.x, calling mapper.setDateFormat has no effect on its time zone.
The text was updated successfully, but these errors were encountered:
Ok, this does sound like a problem. Unfortunately timezone handling is a rather messy area of Jackson databinding. But sounds like in this case solution might be relatively easy, by trying to retain existing configured time zone and not taking it from DateFormat
The idea with the change was to allow piggy-backing timezone configuration, but all in all it is probably better not to try to be too clever. And since it changed behavior for existing code, it's a no-no.
Thank you for reporting this, and apologies for breakage. Fix will be in 2.6.1; we are getting enough fixes to release that relatively soon now, esp. considering couple of other issue with Joda / Java8 datetime datatype modules.
The serialisation of Joda
DateTime
instances behaves differently in 2.6.0 vs 2.5.4 when theObjectMapper
's had itsDateFormat
configured. The behaviour change is illustrated by the following code:When run with Jackson 2.5.4 the output is:
When run with Jackson 2.6.0 the output is:
It looks like the fix for #824 is the cause. In 2.6, the call to
mapper.setDateFormat
causes theObjectMapper
's time zone to be set to the JVM's default time zone. In 2.5.x, callingmapper.setDateFormat
has no effect on its time zone.The text was updated successfully, but these errors were encountered: