java.time.ZoneOffset.query() 方法示例


java.time.ZoneOffset.query() 方法示例

package com.codingdict;

import java.time.ZoneOffset;
import java.time.temporal.TemporalQueries;

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

      ZoneOffset zoneOffset = ZoneOffset.of("+02:00");
      System.out.printf("ZoneOffset zone is %s%n",
         zoneOffset.query(TemporalQueries.zone()));
   }
}