code: public static ZonedDateTime from(TemporalAccessor temporal) {
          if (temporal instanceof ZonedDateTime) {
              return (ZonedDateTime) temporal;
          }
          try {
              ZoneId zone = ZoneId.from(temporal);
              if (temporal.isSupported(INSTANT_SECONDS)) {
                  long epochSecond = temporal.getLong(INSTANT_SECONDS);
                  int nanoOfSecond = temporal.get(NANO_OF_SECOND);
                  return create(epochSecond, nanoOfSecond, zone);
              } else {
                  LocalDate date = LocalDate.from(temporal);
                  LocalTime time = LocalTime.from(temporal);
                  return of(date, time, zone);
              }
          } catch (DateTimeException ex) {
              throw new DateTimeException("Unable to obtain ZonedDateTime from TemporalAccessor: " +
                      temporal + " of type " + temporal.getClass().getName(), ex);
          }
      }
docs: Obtains an instance of {@code ZonedDateTime} from a temporal object.
  <p>
  This obtains a zoned date-time 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 ZonedDateTime}.
  <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 LocalDateTime} if necessary.
  The result will be either the combination of {@code ZoneId} or {@code ZoneOffset}
  with {@code Instant} or {@code LocalDateTime}.
  Implementations are permitted to perform optimizations such as accessing
  those fields that are equivalent to the relevant objects.
  <p>
  This method matches the signature of the functional interface {@link TemporalQuery}
  allowing it to be used as a query via method reference, {@code ZonedDateTime::from}.
  
  @param temporal  the temporal object to convert, not null
  @return the zoned date-time, not null
  @throws DateTimeException if unable to convert to an {@code ZonedDateTime}