Java8 has new date and time classes to “replace” the old not-so-beloved java.util.Date class. Unfortunately though, converting between the two is somewhat less obvious than you might expect. Convert java.util.Date to java.time.LocalDateTime Date ts = ...; Instant instant = Instant.ofEpochMilli(ts.getTime()); LocalDateTime res = LocalDateTime.ofInstant(instant, ZoneId.systemDefault()); The big tric