java.time.OffsetTime.withSecond() 方法示例 java.time.OffsetTime.withOffsetSameLocal() 方法示例 java.time.Period.addTo() 方法示例 java.time.OffsetTime.withSecond() 方法示例 package com.codingdict; import java.time.OffsetTime; public class OffsetTimeDemo { public static void main(String[] args) { OffsetTime time = OffsetTime.parse("10:15:30+01:00"); OffsetTime result = time.withSecond(20); System.out.println(result); } } java.time.OffsetTime.withOffsetSameLocal() 方法示例 java.time.Period.addTo() 方法示例