code: public Instant adjustTime(Instant instant, ZoneId zoneId, boolean roundUp,
                                DayOfWeek firstDayOfWeek) {
  
          requireNonNull(instant);
          requireNonNull(zoneId);
          requireNonNull(firstDayOfWeek);
  
          ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(instant, zoneId);
          if (roundUp) {
              zonedDateTime = zonedDateTime.plus(getAmount(), getUnit());
          }
  
          zonedDateTime = Util.truncate(zonedDateTime, getUnit(), getAmount(),
                  firstDayOfWeek);
  
          return Instant.from(zonedDateTime);
      }
docs: Adjusts the given instant either rounding it up or down.
  
  @param instant
  the instant to adjust
  @param zoneId
  the time zone
  @param roundUp
  the rounding direction
  @param firstDayOfWeek
  the first day of the week (needed for rounding weeks)
  @return the adjusted instant