OffsetDateTime.ToZonedDateTime Method

Definition

Converts this date-time to a ZonedDateTime using the offset as the zone ID.

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

Returns

a zoned date-time representing the same local date-time and offset, not null

Attributes

Remarks

Converts this date-time to a ZonedDateTime using the offset as the zone ID. This creates the simplest possible ZonedDateTime using the offset as the zone ID. To control the time-zone used, see atZoneSameInstant(ZoneId) and atZoneSimilarLocal(ZoneId).

Java reference for java.time.OffsetDateTime.toZonedDateTime.

Applies to