Date类型转换成LocalDateTime 类型

Date to LocalDateTime:

        Date currDate = new Date();
        LocalDateTime ldt = currDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
        System.out.println(ldt);
输出:

2020-01-19T15:41:02.048

  

原文地址:https://www.cnblogs.com/xianz666/p/15347618.html