public static ZoneOffset from (TemporalAccessor temporal)

Obtains an instance of ZoneOffset from a temporal object.

This obtains an offset based on the specified temporal. A TemporalAccessor represents an arbitrary set of date and time information, which this factory converts to an instance of ZoneOffset.

A TemporalAccessor represents some form of date and time information. This factory converts the arbitrary temporal object to an instance of ZoneOffset.

The conversion uses the TemporalQueries.offset() query, which relies on extracting the OFFSET_SECONDS field.

This method matches the signature of the functional interface TemporalQuery allowing it to be used as a query via method reference, ZoneOffset::from.

Parameters:
temporal    the temporal object to convert, not null

Returns:  the zone-offset, not null

Exceptions:
DateTimeException    if unable to convert to an ZoneOffset