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)) {
                  try {
                      long epochSecond = temporal.getLong(INSTANT_SECONDS);
                      int nanoOfSecond = temporal.get(NANO_OF_SECOND);
                      return create(epochSecond, nanoOfSecond, zone);
  
                  } catch (DateTimeException ex) {
                      // ignore
                  }
              }
              LocalDateTime ldt = LocalDateTime.from(temporal);
              return of(ldt, zone);
          } catch (DateTimeException ex) {
              throw new DateTimeException("Unable to obtain ZonedDateTime from TemporalAccessor: " +
                      temporal + ", type " + temporal.getClass().getName());
          }
      }
docs: Obtains an instance of {@code ZonedDateTime} from a temporal object.
  <p>
  A {@code TemporalAccessor} represents some form of date and time information.
  This factory converts the arbitrary temporal object to an instance of {@code ZonedDateTime}.
  <p>
  The conversion will first obtain a {@code ZoneId}. It will then try to obtain an instant.
  If that fails it will try to obtain a local date-time.
  The zoned date time will either be a combination of {@code ZoneId} and instant,
  or {@code ZoneId} and local date-time.
  <p>
  This method matches the signature of the functional interface {@link TemporalQuery}
  allowing it to be used in queries 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}