code: public ZonedDateTime adjustTime(ZonedDateTime time, boolean roundUp,
                                      DayOfWeek firstDayOfWeek) {
          Instant instant = time.toInstant();
          ZoneId zoneId = time.getZone();
          instant = adjustTime(instant, zoneId, roundUp, firstDayOfWeek);
          return ZonedDateTime.ofInstant(instant, zoneId);
      }
docs: Adjusts the given time either rounding it up or down.
  
  @param time
  the time to adjust
  @param roundUp
  the rounding direction
  @param firstDayOfWeek
  the first day of the week (needed for rounding weeks)
  @return the adjusted time