java.time.ZonedDateTime.ofInstant() 方法示例 java.time.ZonedDateTime.of(LocalDateTime date, ZoneId zone) java.time.ZonedDateTime.ofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone) java.time.ZonedDateTime.ofInstant() 方法示例 package com.codingdict; import java.time.Instant; import java.time.ZonedDateTime; import java.time.ZoneId; public class ZonedDateTimeDemo { public static void main(String[] args) { ZonedDateTime date = ZonedDateTime.ofInstant(Instant.now(), ZoneId.systemDefault() ); System.out.println(date); } } java.time.ZonedDateTime.of(LocalDateTime date, ZoneId zone) java.time.ZonedDateTime.ofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)