java.time.OffsetTime.withHour() 方法示例 java.time.OffsetTime.with(TemporalField field, long newValue) java.time.OffsetTime.withMinute() 方法示例 java.time.OffsetTime.withHour() 方法示例 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.withHour(3); System.out.println(result); } } java.time.OffsetTime.with(TemporalField field, long newValue) java.time.OffsetTime.withMinute() 方法示例