james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1204864 - in /james/mime4j/trunk/dom/src: main/java/org/apache/james/mime4j/field/DateTimeFieldLenientImpl.java test/java/org/apache/james/mime4j/field/LenientDateTimeFieldTest.java
Date Tue, 22 Nov 2011 08:57:27 GMT
Author: olegk
Date: Tue Nov 22 08:57:26 2011
New Revision: 1204864

URL: http://svn.apache.org/viewvc?rev=1204864&view=rev
Log:
MIME4J-208: DateTimeFieldLenientImpl used incorrect date-time format

Modified:
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/DateTimeFieldLenientImpl.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientDateTimeFieldTest.java

Modified: james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/DateTimeFieldLenientImpl.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/DateTimeFieldLenientImpl.java?rev=1204864&r1=1204863&r2=1204864&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/DateTimeFieldLenientImpl.java
(original)
+++ james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/DateTimeFieldLenientImpl.java
Tue Nov 22 08:57:26 2011
@@ -39,8 +39,8 @@ import org.apache.james.mime4j.stream.Fi
 public class DateTimeFieldLenientImpl extends AbstractField implements DateTimeField {
 
     private static final String[] DEFAULT_DATE_FORMATS =  { 
-        "EEE, dd MMM yyyy hh:mm:ss ZZZZ", 
-        "dd MMM yyyy hh:mm:ss ZZZZ"};
+        "EEE, dd MMM yyyy HH:mm:ss ZZZZ", 
+        "dd MMM yyyy HH:mm:ss ZZZZ"};
 
     private final List<String> datePatterns;
 

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientDateTimeFieldTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientDateTimeFieldTest.java?rev=1204864&r1=1204863&r2=1204864&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientDateTimeFieldTest.java
(original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientDateTimeFieldTest.java
Tue Nov 22 08:57:26 2011
@@ -47,5 +47,10 @@ public class LenientDateTimeFieldTest ex
         DateTimeField f = parse("Date: 16 Jul 2008 17:12:33 +0200");
         assertEquals(new Date(1216221153000L), f.getDate());
     }
+    
+    public void testdd() throws Exception {
+        DateTimeField f = parse("Date: Thu, 01 Jan 1970 12:00:00 +0000");
+        assertEquals(43200000L, f.getDate().getTime());
+    }
 
 }



Mime
View raw message