public static void main(String[] args) {
LocalDateTime midnight = LocalDateTime.now().plusDays(1).withHour(0).withMinute(0).withSecond(0).withNano(0);
long seconds = ChronoUnit.SECONDS.between(LocalDateTime.now(), midnight);
System.out.println(seconds);
}
LocalDateTime获取当天还剩多少秒
最新推荐文章于 2024-07-19 03:38:28 发布