by Wolfram Saringer (2011-05-17) last change: 2011-05-17
To format a date according to the HTTP standard (needed in the Last Modified header):
public static String formatHttpDate(Date date) { SimpleDateFormat httpDateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); httpDateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
return httpDateFormat.format(date); }