java.time.OffsetTime.with(TemporalField field, long newValue)


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);  
   }
}