java.time.ZonedDateTime.withZoneSameInstant() 方法示例 java.time.ZonedDateTime.withYear() 方法示例 java.time.ZonedDateTime.withZoneSameLocal() 方法示例 java.time.ZonedDateTime.withZoneSameInstant() 方法示例 package com.codingdict; import java.time.ZoneId; import java.time.ZonedDateTime; public class ZonedDateTimeDemo { public static void main(String[] args) { ZonedDateTime date = ZonedDateTime.parse("2017-03-28T12:25:38.492+05:30[Asia/Calcutta]"); ZonedDateTime result = date.withZoneSameInstant(ZoneId.of("Z")); System.out.println(result); } } java.time.ZonedDateTime.withYear() 方法示例 java.time.ZonedDateTime.withZoneSameLocal() 方法示例