Author: markt Date: Wed Jun 20 15:02:39 2018 New Revision: 1833921 URL: http://svn.apache.org/viewvc?rev=1833921&view=rev Log: Add specific RFC1123 support
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/ConcurrentDateFormat.java Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/ConcurrentDateFormat.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/ConcurrentDateFormat.java?rev=1833921&r1=1833920&r2=1833921&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/ConcurrentDateFormat.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/ConcurrentDateFormat.java Wed Jun 20 15:02:39 2018 @@ -35,6 +35,19 @@ public class ConcurrentDateFormat { private final TimeZone timezone; private final Queue<SimpleDateFormat> queue = new ConcurrentLinkedQueue<SimpleDateFormat>(); + public static final String RFC1123_DATE = "EEE, dd MMM yyyy HH:mm:ss zzz"; + public static final TimeZone GMT = TimeZone.getTimeZone("GMT"); + + private static final ConcurrentDateFormat FORMAT_RFC1123; + + static { + FORMAT_RFC1123 = new ConcurrentDateFormat(RFC1123_DATE, Locale.US, GMT); + } + + public static String formatRfc1123(Date date) { + return FORMAT_RFC1123.format(date); + } + public ConcurrentDateFormat(String format, Locale locale, TimeZone timezone) { this.format = format; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org