Return-Path: Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: (qmail 51691 invoked from network); 29 Jan 2009 15:11:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jan 2009 15:11:04 -0000 Received: (qmail 20226 invoked by uid 500); 29 Jan 2009 15:11:04 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 20205 invoked by uid 500); 29 Jan 2009 15:11:04 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 20194 invoked by uid 99); 29 Jan 2009 15:11:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jan 2009 07:11:04 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jan 2009 15:11:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8FC94238895D; Thu, 29 Jan 2009 15:10:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r738881 - /james/mime4j/trunk/src/main/java/org/apache/james/mime4j/util/MimeUtil.java Date: Thu, 29 Jan 2009 15:10:43 -0000 To: mime4j-dev@james.apache.org From: mwiederkehr@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090129151043.8FC94238895D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mwiederkehr Date: Thu Jan 29 15:10:42 2009 New Revision: 738881 URL: http://svn.apache.org/viewvc?rev=738881&view=rev Log: explicitly set default time zone because DateFormat is kept in a ThreadLocal Modified: james/mime4j/trunk/src/main/java/org/apache/james/mime4j/util/MimeUtil.java Modified: james/mime4j/trunk/src/main/java/org/apache/james/mime4j/util/MimeUtil.java URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/java/org/apache/james/mime4j/util/MimeUtil.java?rev=738881&r1=738880&r2=738881&view=diff ============================================================================== --- james/mime4j/trunk/src/main/java/org/apache/james/mime4j/util/MimeUtil.java (original) +++ james/mime4j/trunk/src/main/java/org/apache/james/mime4j/util/MimeUtil.java Thu Jan 29 15:10:42 2009 @@ -411,9 +411,13 @@ */ public static String formatDate(Date date, TimeZone zone) { DateFormat df = RFC822_DATE_FORMAT.get(); - if (zone != null) { + + if (zone == null) { + df.setTimeZone(TimeZone.getDefault()); + } else { df.setTimeZone(zone); } + return df.format(date); }