Java8 LocalDatetime与 java.util.Date 互转
Date to LocalDateTime
Date todayDate = new Date();
LocalDateTime localDate = todayDate.toInstant().atZone( ZoneId.systemDefault()).toLocalDateTime();
LocalDateTime to Date
LocalDateTime localDateTime = LocalDateTime.now();
Date date = Date.from( localDateTime.atZone( ZoneId.systemDefault()).toInstant());
本文来自博客园,作者:jason_bo,转载请注明原文链接:https://www.cnblogs.com/jasonboboblog/p/17261739.html