|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-01-06 15:58 UTC] 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.
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 18:00:02 2025 UTC |
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.