java.time.OffsetTime.with(TemporalField field, long newValue) java.time.OffsetTime.with() 方法示例 java.time.OffsetTime.withHour() 方法示例 java.time.OffsetTime.with(TemporalField field, long newValue) package com.codingdict; import java.time.OffsetTime; import java.time.temporal.ChronoField; public class OffsetTimeDemo { public static void main(String[] args) { OffsetTime date = OffsetTime.parse("10:15:30+01:00"); OffsetTime result = date.with(ChronoField.HOUR_OF_DAY,13); System.out.println(result); } } java.time.OffsetTime.with() 方法示例 java.time.OffsetTime.withHour() 方法示例