ZoneRules.GetValidOffsets(LocalDateTime) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得這些規則中指定當地日期時間適用的偏移量。
[Android.Runtime.Register("getValidOffsets", "(Ljava/time/LocalDateTime;)Ljava/util/List;", "", ApiSince=26)]
public System.Collections.Generic.IList<Java.Time.ZoneOffset>? GetValidOffsets(Java.Time.LocalDateTime? localDateTime);
[<Android.Runtime.Register("getValidOffsets", "(Ljava/time/LocalDateTime;)Ljava/util/List;", "", ApiSince=26)>]
member this.GetValidOffsets : Java.Time.LocalDateTime -> System.Collections.Generic.IList<Java.Time.ZoneOffset>
參數
- localDateTime
- LocalDateTime
當地查詢有效偏移量的日期時間。 固定偏移規則可忽略 null;變數規則則不行。
傳回
一個可能不可變的有效偏移量清單。 該清單中空白條目為零,一般本地日期時間有一條,重疊有兩條;在重疊中,較早的偏移量為先。
- 屬性
例外狀況
如果 localDateTime 是 null 且規則不是固定偏移,則會被拋出。