code: public static String formatRFC822(final Date date, final Locale locale) {
          final SimpleDateFormat dateFormater = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'", locale);
          dateFormater.setTimeZone(TimeZone.getTimeZone("GMT"));
          return dateFormater.format(date);
      }
docs: create a RFC822 representation of a date.
  <p/>
  Refer to the java.text.SimpleDateFormat javadocs for details on the format of each element.
  <p/>
  
  @param date Date to parse
  @return the RFC822 represented by the given Date It returns <b>null</b> if it was not
  possible to parse the date.