Java中LocalDateTime类中的now()方法从默认时区的系统时钟中获取当前日期时间。此方法不需要任何参数,它会在默认时区中从系统时钟返回当前日期时间。
LocalDateTime.now();