Open msiniy opened 5 years ago
From description, I am guessing it might be as simple as adding missing .withOffsetParsed()
in there, but I realized that I do not have means to reproduce the issue yet. Would it be possible to add a very simple reproduction here? That way I can see the problem, verify fix & guard against regression going forward.
Also worth noting: DateMidnight
type itself has been deprecated in Joda for years.
I've faced a problem with DateMidnightSerializer. It doesn't respect the Timezone from serialization context. I think it's the only class that uses JacksonJodaDateFormat.createFormatterWithLocale
https://github.com/FasterXML/jackson-datatype-joda/blob/e5dc3f5b8b255b879e64b944447765cbdf4c7f3d/src/main/java/com/fasterxml/jackson/datatype/joda/ser/DateMidnightSerializer.java#L55 while the others use JacksonJodaDateFormat.createFormatter https://github.com/FasterXML/jackson-datatype-joda/blob/e5dc3f5b8b255b879e64b944447765cbdf4c7f3d/src/main/java/com/fasterxml/jackson/datatype/joda/ser/DateTimeSerializer.java#L71 and therefore aren't affected.