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


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

package com.codingdict;

import java.time.LocalTime;
import java.time.ZonedDateTime;

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

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

      LocalTime date1 = LocalTime.parse("12:30:30");
      date = (ZonedDateTime)date1.adjustInto(date);
      System.out.println(date);  
   }
}