Jorge Solórzano created COMPRESS-617:
----------------------------------------

             Summary: ZipArchiveOutputStream should use last modification time 
(mtime) of ZipEntry
                 Key: COMPRESS-617
                 URL: https://issues.apache.org/jira/browse/COMPRESS-617
             Project: Commons Compress
          Issue Type: Task
          Components: Archivers
    Affects Versions: 1.21
            Reporter: Jorge Solórzano


ZipArchiveOutputStream is a reimplementation of java.util.zip.ZipOutputStream, 
but since Java 8+ java.util.zip.ZipOutputStream supports setting extended 
timestamp fields in optional extra data in UTC time which 
ZipArchiveOutputStream do not use:

??When output to a ZIP file or ZIP file formatted output stream the last 
modification time set by this method will be stored into zip file entry's date 
and time fields in standard MS-DOS date and time format), and the extended 
timestamp fields in optional extra data in UTC time.??
https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/zip/ZipEntry.html#setLastModifiedTime(java.nio.file.attribute.FileTime)

As such the reimplementation of ZipArchiveOutputStream should try to follow as 
close as possible the behavior of java.util.zip.ZipOutputStream.

So if I setLastModifiedTime(FileTime) in a ZipEntry, that time should add the 
extended timestamp fields in the ZipArchiveOutputStream.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to