title: Deserialization of java.util.time.LocalDateTime to joda LocalDateTime
body: <p>I've got REST webservice exposing resources with creation date. It is written in Java 8 - using LocalDateTime. Jackson 2 is serializing it to:</p>
  
  <p><code>"createdDate": [2016, 5, 19, 18, 6, 59, 639000000]</code></p>
  
  <p>In other application my goal is to consume this rest, but there is only Java 7, so I decided to use joda-time library in DTO. I've set up RestTemplate like this:</p>
  
  <pre><code>        RestTemplate restTemplate = new RestTemplate();
          MappingJackson2HttpMessageConverter e = new MappingJackson2HttpMessageConverter();
          ObjectMapper mapper = new ObjectMapper();
          mapper.registerModule(new JodaModule());
          e.setObjectMapper(mapper);
          messageConverters.add(e);
          restTemplate.setMessageConverters(messageConverters);
          HttpHeaders headers = new HttpHeaders();
          headers.setContentType(MediaType.APPLICATION_JSON);
          HttpEntity&lt;NewUserData&gt; request = new HttpEntity&lt;&gt;(user, headers);
  </code></pre>
  
  <p>POST is successful, however while deserializing answer (with createdDate field from above) exception is thrown:</p>
  
  <pre><code>org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Value 696000000 for millisOfSecond must be in the range [0,999] (through reference chain: com.foobar.dto.user.UserItem["createdDate"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Value 696000000 for millisOfSecond must be in the range [0,999] (through reference chain: com.foobar.dto.user.UserDisplayItem["createdDate"])
  </code></pre>
  
  <p>My dependencies looks like this:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
          &lt;version&gt;3.2.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc-portlet&lt;/artifactId&gt;
          &lt;version&gt;3.2.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
          &lt;version&gt;3.2.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;joda-time&lt;/groupId&gt;
          &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
          &lt;version&gt;2.9.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.datatype&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-datatype-joda&lt;/artifactId&gt;
          &lt;version&gt;2.7.4&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Should I write my own Jackson deserializer or maybe i could use other library/version?</p>