转换主要通过Instant来进行的。
Date date = new Date();
LocalDateTime localDateTime = LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());Instant instant = localDateTime.atZone(ZoneId.systemDefault()).toInstant();
date = Date.from(instant);
转换主要通过Instant来进行的。
Date date = new Date();
LocalDateTime localDateTime = LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());Instant instant = localDateTime.atZone(ZoneId.systemDefault()).toInstant();
date = Date.from(instant);
该资源仅限VIP专享下载