TimeUtils.GetTimeZone(Int32, Boolean, Int64, String) 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.
Tries to return a time zone that would have had the specified offset and DST value at the specified moment in the specified country.
[Android.Runtime.Register("getTimeZone", "(IZJLjava/lang/String;)Ljava/util/TimeZone;", "")]
public static Java.Util.TimeZone? GetTimeZone(int offset, bool dst, long when, string? country);
[<Android.Runtime.Register("getTimeZone", "(IZJLjava/lang/String;)Ljava/util/TimeZone;", "")>]
static member GetTimeZone : int * bool * int64 * string -> Java.Util.TimeZone
Parameters
- offset
- Int32
The required UTC offset in milliseconds, including any daylight-saving adjustment.
- dst
- Boolean
Whether the matching zone must be using daylight saving time at when.
- when
- Int64
The instant, in milliseconds since the Unix epoch, at which the offset and daylight-saving state apply.
- country
- String
The ISO 3166-1 alpha-2 identifier used to select the time-zone mappings.
Returns
A matching time zone, or null if no candidate meets the country/region, offset, and daylight-saving conditions at the specified time.
- Attributes
Remarks
Tries to return a time zone that would have had the specified offset and DST value at the specified moment in the specified country. Returns null if no suitable zone could be found.
Java documentation for android.util.TimeUtils.getTimeZone(int, boolean, long, 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.