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


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

package com.codingdict;

import java.time.OffsetTime;
import java.time.ZonedDateTime;

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

      ZonedDateTime date = ZonedDateTime.now();
      System.out.println(date);  

      OffsetTime date1 = OffsetTime.parse("12:30:30+01:00");
      date = (ZonedDateTime)date1.adjustInto(date);
      System.out.println(date);  
   }
}