title: Serialize LocalDateTime with only milliseconds with Jackson
body: <p>I want to serialize a <code>LocalDateTime</code> to textual format while only showing milliseconds. I tried the following example:</p>
  
  <pre><code>final ObjectMapper mapper = new ObjectMapper();
  
  mapper.registerModule(new Jdk8Module());
  mapper.registerModule(new JavaTimeModule());
  mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
  mapper.disable(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS);
  
  final LocalDateTime t = LocalDateTime.of(2014, 3, 30, 12, 30, 23, 123456789);
  
  System.out.println(mapper.writeValueAsString(t));
  </code></pre>
  
  <p>This outputs:</p>
  
  <pre><code>"2014-03-30T12:30:23.123456789"
  </code></pre>
  
  <p>So the precision is still in nanoseconds, despite to not show them as per <code>mapper.disable(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS)</code>.</p>
  
  <p>I expected:</p>
  
  <pre><code>"2014-03-30T12:30:23.123"
  </code></pre>
  
  <p>Why is this? How can I fix this?</p>