Here you can find the source of rfc1123Format(Date date)
public static String rfc1123Format(Date date)
//package com.java2s; //License from project: BSD License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { private static final ThreadLocal<DateFormat> RFC_1123 = new ThreadLocal<DateFormat>() { @Override/*from www. j a v a 2 s. c o m*/ protected DateFormat initialValue() { SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz"); format.setTimeZone(TimeZone.getTimeZone("GMT")); return format; } }; public static String rfc1123Format(Date date) { return RFC_1123.get().format(date); } }