code: public static long adjustWatermark(String baseWatermark, int diff) {
      SimpleDateFormat parser = new SimpleDateFormat(INPUTFORMAT);
      try {
        Date date = parser.parse(baseWatermark);
        return Long.parseLong(parser.format(Utils.addSecondsToDate(date, diff)));
      } catch (ParseException e) {
        LOG.error("Fail to adjust timestamp watermark", e);
      }
      return -1;
    }
docs: Adjust the given watermark by diff
  
  @param baseWatermark the original watermark
  @param diff the amount to change
  @return the adjusted watermark value