code: private long getCalculatedTime(long baseTime, String deltaDays, String key, long defaultTime) {
  
          try {
              long days = Long.parseLong(deltaDays);
              long delta = 1000L * 60L * 60L * 24L * days;
              long result = baseTime - delta;
              if (result >= 0) {
                  // result is a valid time stamp
                  return result;
              }
          } catch (NumberFormatException e) {
              LOG.error(Messages.get().getBundle().key(Messages.ERR_COLLECTOR_PARAM_INVALID_1, key + "=" + deltaDays));
          }
          return defaultTime;
      }
docs: Returns the calculated time with the days delta using the base time.<p>
  
  @param baseTime the base time to calculate the returned time from
  @param deltaDays the number of days which should be subtracted from the base time
  @param key the parameter key name used for error messages
  @param defaultTime the default time is used if there were errors calculating the resulting time
  
  @return the calculated time