code: private boolean validateTimestamp(String timestamp) {
          DateTime requestTime = TimeUtils.parse(timestamp);
          long difference = Math.abs(new Duration(requestTime, nowInUTC()).getMillis());
          return difference <= allowedTimestampRange;
      }
docs: To protect against replay attacks, make sure the timestamp on the request is valid
  by ensuring that the difference between the request time and the current time on the
  server does not fall outside the acceptable time range. Note that the request time
  may have been generated on a different machine and so it may be ahead or behind the
  current server time.
  
  @param timestamp the timestamp specified on the request (in standard ISO8601 format)
  @return true if the timestamp is valid