I want to calculate the time difference in milliseconds between two LocalDateTime objects:
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)
However, the value for diff is not 2, as I would expect, but 0. What's going on?