Converting between java.time.LocalDateTime and java.util.Date

Short answer: Explanation: (based on this question about LocalDate) Despite its name, java.util.Date represents an instant on the time-line, not a “date”. The actual data stored within the object is a long count of milliseconds since 1970-01-01T00:00Z (midnight at the start of 1970 GMT/UTC). The equivalent class to java.util.Date in JSR-310 is Instant, thus there are convenient methods to provide the conversion to and fro: … Read more