java.time.LocalDateTime.now(ZoneId zone) java.time.LocalDateTime.now(Clock clock) java.time.LocalDateTime.of() 方法示例 java.time.LocalDateTime.now(ZoneId zone) package com.codingdict; import java.time.LocalDateTime; import java.time.ZoneId; public class LocalDateTimeDemo { public static void main(String[] args) { LocalDateTime date = LocalDateTime.now(ZoneId.systemDefault()); System.out.println(date); } } java.time.LocalDateTime.now(Clock clock) java.time.LocalDateTime.of() 方法示例