java.time.OffsetDateTime.from() 方法示例


java.time.OffsetDateTime.from() 方法示例

package com.codingdict;

import java.time.OffsetDateTime;
import java.time.ZonedDateTime;

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

      OffsetDateTime date = OffsetDateTime.from(ZonedDateTime.now());
      System.out.println(date);  
   }
}