FasterXML / jackson-datatype-joda

Extension module to properly support full datatype set of Joda datetime library
Apache License 2.0
140 stars 82 forks source link

TimeZone in DeserializationContext is ignored with SerializationFeature.WRITE_DATES_WITH_ZONE_ID #68

Closed islanderman closed 9 years ago

islanderman commented 9 years ago

As discussed in #67, here's a simple test case that reproduces the issue. In #66 SerializationFeature.WRITE_DATES_WITH_ZONE_ID is supported, but the original TimeZone in DeserializationContext is not.

        MAPPER.setTimeZone(TimeZone.getTimeZone("Europe/Paris"));

        Interval interval = MAPPER.readValue(quote("1396439982-1396440001"), Interval.class);
        assertEquals(1396439982, interval.getStartMillis());
        assertEquals(1396440001, interval.getEndMillis());
        assertEquals(ISOChronology.getInstance(DateTimeZone.forID("Europe/Paris")), interval.getChronology());