public static void main(String[] args) {
LocalDateTime now = LocalDateTime.now();
String formatDateStr = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
System.out.println(formatDateStr);
}
LocalDateTime格式化时间
最新推荐文章于 2024-07-07 13:16:29 发布