@Test public void testLocalDateConversion() { Date now = new Date(); LocalDateTime localDateTime = DateUtil.localDateTime(now); Instant ldtInstant = localDateTime.toInstant(OffsetDateTime.now().getOffset()); Assertions.assertEquals(ldtInstant, now.toInstant()); }
public static LocalDateTime localDateTime(Date date) { return date == null ? null : date.toInstant() .atZone(ZoneId.systemDefault()) .toLocalDateTime(); }
DateUtil { public static LocalDateTime localDateTime(Date date) { return date == null ? null : date.toInstant() .atZone(ZoneId.systemDefault()) .toLocalDateTime(); } }
DateUtil { public static LocalDateTime localDateTime(Date date) { return date == null ? null : date.toInstant() .atZone(ZoneId.systemDefault()) .toLocalDateTime(); }  }
DateUtil { public static LocalDateTime localDateTime(Date date) { return date == null ? null : date.toInstant() .atZone(ZoneId.systemDefault()) .toLocalDateTime(); }  static LocalDateTime localDateTime(Date date); }
DateUtil { public static LocalDateTime localDateTime(Date date) { return date == null ? null : date.toInstant() .atZone(ZoneId.systemDefault()) .toLocalDateTime(); }  static LocalDateTime localDateTime(Date date);  }