< prev index next >

src/java.base/share/classes/java/util/zip/ZipEntry.java

Print this page
rev 11478 : 8073497: Lazy conversion of ZipEntry time
Reviewed-by: TBD

@@ -135,11 +135,11 @@
      *
      * @see #getTime()
      * @see #getLastModifiedTime()
      */
     public void setTime(long time) {
-        this.time = time;
+        this.time = javaToDosTime(time);
         this.mtime = null;
     }
 
     /**
      * Returns the last modification time of the entry.

@@ -156,11 +156,11 @@
      *
      * @see #setTime(long)
      * @see #setLastModifiedTime(FileTime)
      */
     public long getTime() {
-        return time;
+        return dosToJavaTime(time);
     }
 
     /**
      * Sets the last modification time of the entry.
      *
< prev index next >