ZoneId.OfOffset(String, ZoneOffset) Method

Definition

Obtains an instance of ZoneId wrapping an offset.

[Android.Runtime.Register("ofOffset", "(Ljava/lang/String;Ljava/time/ZoneOffset;)Ljava/time/ZoneId;", "", ApiSince=26)]
public static Java.Time.ZoneId? OfOffset(string? prefix, Java.Time.ZoneOffset? offset);
[<Android.Runtime.Register("ofOffset", "(Ljava/lang/String;Ljava/time/ZoneOffset;)Ljava/time/ZoneId;", "", ApiSince=26)>]
static member OfOffset : string * Java.Time.ZoneOffset -> Java.Time.ZoneId

Parameters

prefix
String

the time-zone ID, not null

offset
ZoneOffset

the offset, not null

Returns

the zone ID, not null

Attributes

Remarks

Obtains an instance of ZoneId wrapping an offset. If the prefix is "GMT", "UTC", or "UT" a ZoneId with the prefix and the non-zero offset is returned. If the prefix is empty "" the ZoneOffset is returned.

Java reference for java.time.ZoneId.ofOffset.

Applies to