文章目录[隐藏]
https://www.yiibai.com/javatime/javatime_localdate.html
Date date = Date.from(planDate.atStartOfDay(ZoneId.systemDefault()).toInstant()
Date date = Date.from( localDateTime.atZone(ZoneId.systemDefault()).toInstant());
LocalDate localDate = LocalDate.ofInstant(date.toInstant(),
ZoneId.systemDefault());
LocalDateTime localDateTime = LocalDateTime.ofInstant(date.toInstant(),
ZoneId.systemDefault());
LocalDateTime.ofInstant(Instant.ofEpochMilli(time),ZoneId.systemDefault());
LocalDateTime.ofInstant(Instant.ofEpochSecond(time),ZoneId.systemDefault());
# 运行时间
Duration duration = Duration.ofSeconds(uptime);
String uptimeNew = duration.toDays()+"天"+duration.toHoursPart()+"小时"+duration.toMinutesPart()+"分钟";