TimeZone.GetTimeZone Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetTimeZone(String) |
Gets the |
GetTimeZone(String, TimeZoneType) |
Gets the |
GetTimeZone(String)
Gets the TimeZone
for the given ID.
[Android.Runtime.Register("getTimeZone", "(Ljava/lang/String;)Landroid/icu/util/TimeZone;", "", ApiSince=24)]
public static Android.Icu.Util.TimeZone? GetTimeZone (string? ID);
[<Android.Runtime.Register("getTimeZone", "(Ljava/lang/String;)Landroid/icu/util/TimeZone;", "", ApiSince=24)>]
static member GetTimeZone : string -> Android.Icu.Util.TimeZone
Parameters
- ID
- String
the ID for a TimeZone
, such as "America/Los_Angeles",
or a custom ID such as "GMT-8:00". Note that the support of abbreviations,
such as "PST", is for JDK 1.1.x compatibility only and full names should be used.
Returns
the specified TimeZone
, or a mutable clone of the UNKNOWN_ZONE
if the given ID cannot be understood or if the given ID is "Etc/Unknown".
- Attributes
Remarks
Gets the TimeZone
for the given ID.
Java documentation for android.icu.util.TimeZone.getTimeZone(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
GetTimeZone(String, TimeZoneType)
Gets the TimeZone
for the given ID and the timezone type.
[Android.Runtime.Register("getTimeZone", "(Ljava/lang/String;I)Landroid/icu/util/TimeZone;", "", ApiSince=24)]
public static Android.Icu.Util.TimeZone? GetTimeZone (string? ID, Android.Icu.Util.TimeZoneType type);
[<Android.Runtime.Register("getTimeZone", "(Ljava/lang/String;I)Landroid/icu/util/TimeZone;", "", ApiSince=24)>]
static member GetTimeZone : string * Android.Icu.Util.TimeZoneType -> Android.Icu.Util.TimeZone
Parameters
- ID
- String
the ID for a TimeZone
, such as "America/Los_Angeles", or a
custom ID such as "GMT-8:00". Note that the support of abbreviations, such as
"PST", is for JDK 1.1.x compatibility only and full names should be used.
- type
- TimeZoneType
Time zone type, either TIMEZONE_ICU
or
TIMEZONE_JDK
.
Returns
the specified TimeZone
, or a mutable clone of the UNKNOWN_ZONE if the given ID
cannot be understood or if the given ID is "Etc/Unknown".
- Attributes
Remarks
Gets the TimeZone
for the given ID and the timezone type.
Java documentation for android.icu.util.TimeZone.getTimeZone(java.lang.String, int)
.
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.