title: How to preserve the offset while deserializing OffsetDateTime with Jackson
body: <p>In an incoming JSON, I have an ISO8601-compliant datetime field, containing zone offset. I'd like to preserve this offset, but unfortunately Jackson defaults to GMT/UTC while deserializing this field (what I understood from <a href="http://wiki.fasterxml.com/JacksonFAQDateHandling" rel="noreferrer">http://wiki.fasterxml.com/JacksonFAQDateHandling</a>).</p>
  
  <pre><code>@RunWith(JUnit4.class)
  public class JacksonOffsetDateTimeTest {
  
      private ObjectMapper objectMapper;
  
      @Before
      public void init() {
          objectMapper = Jackson2ObjectMapperBuilder.json()
              .modules(new JavaTimeModule())
              .featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
              .build();
      }
  
      @Test
      public void test() throws IOException {
          final String json = "{ \"date\": \"2000-01-01T12:00:00.000-04:00\" }";
          final JsonType instance = objectMapper.readValue(json, JsonType.class);
  
          assertEquals(ZoneOffset.ofHours(-4), instance.getDate().getOffset());
      }
  }
  
  
  public class JsonType {
      private OffsetDateTime date;
  
      // getter, setter
  }
  </code></pre>
  
  <p>What I'm getting here is:</p>
  
  <pre><code>java.lang.AssertionError: expected:&lt;-04:00&gt; but was:&lt;Z&gt;
  </code></pre>
  
  <p>How can I make the returned OffsetDateTime to contain the original Offset?</p>
  
  <p>I'm on Jackson 2.8.3.</p>