Chronology.zonedDateTime

Obtains a {@code ChronoZonedDateTime} _in this chronology from another temporal object. !(p) This obtains a zoned date-time _in this chronology based on the specified temporal. A {@code TemporalAccessor} represents an arbitrary set of date and time information, which this factory converts to an instance of {@code ChronoZonedDateTime}. !(p) The conversion will first obtain a {@code ZoneId} from the temporal object, falling back to a {@code ZoneOffset} if necessary. It will then try to obtain an {@code Instant}, falling back to a {@code ChronoLocalDateTime} if necessary. The result will be either the combination of {@code ZoneId} or {@code ZoneOffset} with {@code Instant} or {@code ChronoLocalDateTime}. Implementations are permitted to perform optimizations such as accessing those fields that are equivalent to the relevant objects. The result uses this chronology. !(p) This method matches the signature of the functional interface {@link TemporalQuery} allowing it to be used as a query via method reference, {@code aChronology::zonedDateTime}.

@param temporal the temporal object to convert, not null @return the zoned date-time _in this chronology, not null @throws DateTimeException if unable to create the date-time @see ChronoZonedDateTime#from(TemporalAccessor)

  1. ChronoZonedDateTime!(ChronoLocalDate) zonedDateTime(TemporalAccessor temporal)
    interface Chronology
  2. ChronoZonedDateTime!(ChronoLocalDate) zonedDateTime(Instant instant, ZoneId zone)

Meta