code: public static String toHTTPTimeString(Date date, boolean oldFormat) {
  	if (oldFormat) {
  	    synchronized (HTTP_TIME_STRING_FORMAT_OLD) {
  		return StringUtil.replace(HTTP_TIME_STRING_FORMAT_OLD.format(date), "+00:00", "", true);
  	    }
  	}
  	synchronized (HTTP_TIME_STRING_FORMAT) {
  	    return StringUtil.replace(HTTP_TIME_STRING_FORMAT.format(date), "+00:00", "", true);
  	}
      }
docs: converts a date to a http time String
  
  @param date date to convert
  @param oldFormat "old" in that context means the format support the existing functionality in
  CFML like the function getHTTPTimeString, in that format the date parts are separated
  by a space (like "EE, dd MMM yyyy HH:mm:ss zz"), in the "new" format, the date part is
  separated by "-" (like "EE, dd-MMM-yyyy HH:mm:ss zz")
  @return