code: public static LocalDateTime from(TemporalAccessor temporal) {
          if (temporal instanceof LocalDateTime) {
              return (LocalDateTime) temporal;
          } else if (temporal instanceof ZonedDateTime) {
              return ((ZonedDateTime) temporal).toLocalDateTime();
          } else if (temporal instanceof OffsetDateTime) {
              return ((OffsetDateTime) temporal).toLocalDateTime();
          }
          try {
              LocalDate date = LocalDate.from(temporal);
              LocalTime time = LocalTime.from(temporal);
              return new LocalDateTime(date, time);
          } catch (DateTimeException ex) {
              throw new DateTimeException("Unable to obtain LocalDateTime from TemporalAccessor: " +
                      temporal + " of type " + temporal.getClass().getName(), ex);
          }
      }
docs: Obtains an instance of {@code LocalDateTime} from a temporal object.
  <p>
  This obtains a local 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 LocalDateTime}.
  <p>
  The conversion extracts and combines the {@code LocalDate} and the
  {@code LocalTime} from the temporal object.
  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 LocalDateTime::from}.
  
  @param temporal  the temporal object to convert, not null
  @return the local date-time, not null
  @throws DateTimeException if unable to convert to a {@code LocalDateTime}