Edit report at http://bugs.php.net/bug.php?id=50678&edit=1

 ID:               50678
 Comment by:       hardcorevenom at gmx dot de
 Reported by:      sunchaojun at gmail dot com
 Summary:          files extracted by ZipArchive class lost their
                   original modified time
 Status:           Open
 Type:             Bug
 Package:          Zip Related
 Operating System: windows
 PHP Version:      5.2.12

 New Comment:

Server:

PHP Version 5.2.13

Apache/2.2.3 (Scientific Linux)



ZipArchive::extractTo("dir") sets the dates of all extracted files to
the current time. The original "mdate" stored in the zip archive is not
restored as expected.

AFAIK last access and creation time is not stored in a zip file, only
last modified. So access and creation time is currently set correctly.


Previous Comments:
------------------------------------------------------------------------
[2010-01-06 15:58:51] sunchaojun at gmail dot com

Description:
------------
After I extract a zip file via ZipArchive class in my php codes, I found
that the creation time, modified time and lastaccess time of the files
extracted have been set to the time at that it was being extracted.

Reproduce code:
---------------
---

>From manual page: class.ziparchive

---

$zip = new ZipArchive();

if ($zip->open('test.zip')) {

   zip->extractTo

   zip.close()

}

Expected result:
----------------
A extracted files has the same creation time, modified time and
lastaccess time with its oringinal copy.

Actual result:
--------------
The creation time, modified time and lastaccess time of a extracted file
has been reset when extracting.


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=50678&edit=1

Reply via email to