TimeUtils.GetTimeZoneIdsForCountryCode(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳已知與國家相關的時區ID。
[Android.Runtime.Register("getTimeZoneIdsForCountryCode", "(Ljava/lang/String;)Ljava/util/List;", "", ApiSince=29)]
public static System.Collections.Generic.IList<string>? GetTimeZoneIdsForCountryCode(string countryCode);
[<Android.Runtime.Register("getTimeZoneIdsForCountryCode", "(Ljava/lang/String;)Ljava/util/List;", "", ApiSince=29)>]
static member GetTimeZoneIdsForCountryCode : string -> System.Collections.Generic.IList<string>
參數
- countryCode
- String
該國的 ISO 3166-1 alpha-2 代碼可透過以下方式取得 java.util.Locale#getCountry()
傳回
可以傳遞給 java.util.TimeZone#getTimeZone(String) 類似方法的 ID,或 null 是 countryCode 無法辨識
- 屬性
備註
回傳已知與國家相關的時區ID。
回傳的清單可能與其他裝置上來源不同,例如 android.icu.util.TimeZone#getRegion(String) 可以經過篩選以避免爭議性或過時的映射。
Java 文件 android.util.TimeUtils.getTimeZoneIdsForCountryCode(java.lang.String)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。