Bug #50678 [Com]: files extracted by ZipArchive class lost their original modified time
| From: | michaeld at owl-online dot de | Date: | Wed, 06 Aug 2014 11:40:13 +0000 |
| Subject: | Bug #50678 [Com]: files extracted by ZipArchive class lost their original modified time | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-187001@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=50678&edit=1
ID: 50678
Comment by: michaeld at owl-online 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
Block user comment: N
Private report: N
New Comment:
sadly, it is still in there: php 5.5.11 win and php 5.3.4 linux
Previous Comments:
------------------------------------------------------------------------
[2010-06-15 22:32:02] hardcorevenom at gmx dot de
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.
------------------------------------------------------------------------
[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 https://bugs.php.net/bug.php?id=50678&edit=1