Instant.AtZone(ZoneId) Method

Definition

Combines this instant with a time-zone to create a ZonedDateTime.

[Android.Runtime.Register("atZone", "(Ljava/time/ZoneId;)Ljava/time/ZonedDateTime;", "", ApiSince=26)]
public Java.Time.ZonedDateTime? AtZone(Java.Time.ZoneId? zone);
[<Android.Runtime.Register("atZone", "(Ljava/time/ZoneId;)Ljava/time/ZonedDateTime;", "", ApiSince=26)>]
member this.AtZone : Java.Time.ZoneId -> Java.Time.ZonedDateTime

Parameters

zone
ZoneId

ZoneId: the zone to combine with, not null

Returns

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

Attributes

Remarks

Combines this instant with a time-zone to create a ZonedDateTime. This returns a ZonedDateTime formed from this instant at the specified time-zone. An exception will be thrown if the instant is too large to fit into a zoned date-time. This method is equivalent to ZonedDateTime.ofInstant(this, zone).

Throws: DateTimeException if the result exceeds the supported range

Android reference for java.time.Instant.atZone.

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