java.time.OffsetTime.with() 方法示例


java.time.OffsetTime.with() 方法示例

package com.codingdict;

import java.time.LocalTime;
import java.time.OffsetTime;

public class OffsetTimeDemo {
   public static void main(String[] args) {

      OffsetTime date = OffsetTime.parse("10:15:30+01:00");
      OffsetTime result = date.with(LocalTime.NOON);
      System.out.println(result);  
   }
}