Language

ZoneId.From(ITemporalAccessor) Method

Definition

Obtains an instance of ZoneId from a temporal object.

[Android.Runtime.Register("from", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/ZoneId;", "", ApiSince=26)]
public static Java.Time.ZoneId? From(Java.Time.Temporal.ITemporalAccessor? temporal);
[<Android.Runtime.Register("from", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/ZoneId;", "", ApiSince=26)>]
static member From : Java.Time.Temporal.ITemporalAccessor -> Java.Time.ZoneId

Parameters

temporal
ITemporalAccessor

the temporal object to convert, not null

Returns

the zone ID, not null

Attributes

Remarks

Obtains an instance of ZoneId from a temporal object. This obtains a zone based on the specified temporal. A TemporalAccessor represents an arbitrary set of date and time information, which this factory converts to an instance of ZoneId. A TemporalAccessor represents some form of date and time information. This factory converts the arbitrary temporal object to an instance of ZoneId. The conversion will try to obtain the zone in a way that favours region-based zones over offset-based zones using TemporalQueries.zone(). This method matches the signature of the functional interface TemporalQuery allowing it to be used as a query via method reference, ZoneId::from.

Java reference for java.time.ZoneId.from.

Applies to