java.time.OffsetTime.get() 方法示例 java.time.OffsetTime.from() 方法示例 java.time.OffsetTime.getHour() 方法示例 java.time.OffsetTime.get() 方法示例 package com.codingdict; import java.time.OffsetTime; import java.time.temporal.ChronoField; public class OffsetTimeDemo { public static void main(String[] args) { OffsetTime time = OffsetTime.parse("12:30:30+01:00"); System.out.println(time.get(ChronoField.CLOCK_HOUR_OF_DAY)); } } java.time.OffsetTime.from() 方法示例 java.time.OffsetTime.getHour() 方法示例