title: Java: time difference in milliseconds using LocalDateTime and ChronoUnit
body: <p>I want to calculate the time difference in milliseconds between two LocalDateTime objects:</p>
  
  <pre><code>LocalDateTime startDate = LocalDateTime.of(2017, 11, 22, 21, 30, 30, 250);
  LocalDateTime endDate = LocalDateTime.of(2017, 11, 22, 21, 30, 30, 252);
  long diff = ChronoUnit.MILLIS.between(startDate, endDate)
  </code></pre>
  
  <p>However, the value for diff is not 2, as I would expect, but 0. What's going on?</p>