code: public Interval withEndTime(LocalTime time) {
          requireNonNull(time);
          return new Interval(startDate, startTime, endDate, time, zoneId);
      }
docs: Returns a new interval based on this interval but with a different end
  time.
  
  @param time the new end time
  @return a new interval