Instant.AtOffset(ZoneOffset) Method

Definition

Combines this instant with an offset to create an OffsetDateTime.

[Android.Runtime.Register("atOffset", "(Ljava/time/ZoneOffset;)Ljava/time/OffsetDateTime;", "", ApiSince=26)]
public Java.Time.OffsetDateTime? AtOffset(Java.Time.ZoneOffset? offset);
[<Android.Runtime.Register("atOffset", "(Ljava/time/ZoneOffset;)Ljava/time/OffsetDateTime;", "", ApiSince=26)>]
member this.AtOffset : Java.Time.ZoneOffset -> Java.Time.OffsetDateTime

Parameters

offset
ZoneOffset

ZoneOffset: the offset to combine with, not null

Returns

the offset date-time formed from this instant and the specified offset, not null

Attributes

Remarks

Combines this instant with an offset to create an OffsetDateTime. This returns an OffsetDateTime formed from this instant at the specified offset from UTC/Greenwich. An exception will be thrown if the instant is too large to fit into an offset date-time. This method is equivalent to OffsetDateTime.ofInstant(this, offset).

Throws: DateTimeException if the result exceeds the supported range

Android reference for java.time.Instant.atOffset.

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