commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1556293 - in /commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar: ArArchiveInput.java ArArchiveOutput.java
Date Tue, 07 Jan 2014 17:59:15 GMT
Author: bodewig
Date: Tue Jan  7 17:59:15 2014
New Revision: 1556293

URL: http://svn.apache.org/r1556293
Log:
AR stores date as seconds since epoch

Modified:
    commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveInput.java
    commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveOutput.java

Modified: commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveInput.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveInput.java?rev=1556293&r1=1556292&r2=1556293&view=diff
==============================================================================
--- commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveInput.java
(original)
+++ commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveInput.java
Tue Jan  7 17:59:15 2014
@@ -166,7 +166,7 @@ public class ArArchiveInput extends Abst
 
         currentEntry = new ArArchiveEntry(new ArchiveEntryParameters().withName(temp).withSize(len)
                                           .withOwnerInformation(new OwnerInformation(userId,
asInt(ID_BUF, true)))
-                                          .withLastModifiedDate(new Date(asLong(LAST_MODIFIED_BUF))),
+                                          .withLastModifiedDate(new Date(asLong(LAST_MODIFIED_BUF)
* 1000)),
                                           asInt(FILE_MODE_BUF, 8));
         return currentEntry;
     }

Modified: commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveOutput.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveOutput.java?rev=1556293&r1=1556292&r2=1556293&view=diff
==============================================================================
--- commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveOutput.java
(original)
+++ commons/proper/compress/branches/compress-2.0/src/main/java/org/apache/commons/compress2/formats/ar/ArArchiveOutput.java
Tue Jan  7 17:59:15 2014
@@ -152,7 +152,7 @@ public class ArArchiveOutput extends Abs
         }
 
         offset = fill(offset, 16, (byte) ' ');
-        final String m = "" + pEntry.getLastModifiedDate();
+        final String m = "" + (pEntry.getLastModifiedDate().getTime() / 1000);
         if (m.length() > 12) {
             throw new IOException("modified too long");
         }



Mime
View raw message