Partager via


TimeZone.GetRegion(String) Method

Definition

<strong>[icu]</strong> Returns the region code associated with the given system time zone ID.

[Android.Runtime.Register("getRegion", "(Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=24)]
public static string? GetRegion (string? id);
[<Android.Runtime.Register("getRegion", "(Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=24)>]
static member GetRegion : string -> string

Parameters

id
String

the system time zone ID.

Returns

the region code associated with the given system time zone ID.

Attributes

Remarks

<strong>[icu]</strong> Returns the region code associated with the given system time zone ID. The region code is either ISO 3166 2-letter country code or UN M.49 3-digit area code. When the time zone is not associated with a specific location, for example - "Etc/UTC", "EST5EDT", then this method returns "001" (UN M.49 area code for World).

Java documentation for android.icu.util.TimeZone.getRegion(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