ZonedDateTime.OfLocal(LocalDateTime, ZoneId, ZoneOffset) Method

Definition

Obtains an instance of ZonedDateTime from a local date-time using the preferred offset if possible.

[Android.Runtime.Register("ofLocal", "(Ljava/time/LocalDateTime;Ljava/time/ZoneId;Ljava/time/ZoneOffset;)Ljava/time/ZonedDateTime;", "", ApiSince=26)]
public static Java.Time.ZonedDateTime? OfLocal(Java.Time.LocalDateTime? localDateTime, Java.Time.ZoneId? zone, Java.Time.ZoneOffset? preferredOffset);
[<Android.Runtime.Register("ofLocal", "(Ljava/time/LocalDateTime;Ljava/time/ZoneId;Ljava/time/ZoneOffset;)Ljava/time/ZonedDateTime;", "", ApiSince=26)>]
static member OfLocal : Java.Time.LocalDateTime * Java.Time.ZoneId * Java.Time.ZoneOffset -> Java.Time.ZonedDateTime

Parameters

localDateTime
LocalDateTime

the local date-time, not null

zone
ZoneId

the time-zone, not null

preferredOffset
ZoneOffset

the zone offset, null if no preference

Returns

the zoned date-time, not null

Attributes

Remarks

To be added.

Java reference for java.time.ZonedDateTime.ofLocal.

Applies to