다음을 통해 공유


TimeZone.GetIDForWindowsID(String, String) Method

Definition

<strong>[icu]</strong> Converts a Windows time zone ID to an equivalent system time zone ID for a region.

[Android.Runtime.Register("getIDForWindowsID", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=24)]
public static string? GetIDForWindowsID (string? winid, string? region);
[<Android.Runtime.Register("getIDForWindowsID", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=24)>]
static member GetIDForWindowsID : string * string -> string

Parameters

winid
String

A Windows time zone ID

region
String

A region code, or null if no regional preference.

Returns

A system time zone ID mapped from the input Windows time zone ID, or null when the input ID is unknown or unmappable.

Attributes

Remarks

<strong>[icu]</strong> Converts a Windows time zone ID to an equivalent system time zone ID for a region. For example, system time zone ID "America/Los_Angeles" is returned for input Windows ID "Pacific Standard Time" and region "US" (or null), "America/Vancouver" is returned for the same Windows ID "Pacific Standard Time" and region "CA".

Not all Windows time zones can be mapped to system time zones. When the input Windows time zone ID is unknown or unmappable to a system time zone, then this method returns null.

This implementation utilizes Zone-Tzid mapping data. The mapping data is updated time to time. To get the latest changes, please read the ICU user guide section Updating the Time Zone Data.

Java documentation for android.icu.util.TimeZone.getIDForWindowsID(java.lang.String, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to