code: public static String extractDate(HttpServletRequest request) {
  		if (request == null) {
  			return "";
  		}
  		String date = request.getHeader("X-Amz-Date");
  		if (StringUtils.isBlank(date)) {
  			return request.getParameter("X-Amz-Date");
  		} else {
  			return date;
  		}
  	}
docs: Extracts the date field from a request. It can be a header or a parameter.
  @param request a request
  @return the date