It may be possible, this is the first time its ever been asked. It is probably related to the PHP libs such as ZipArchive that handle the extraction.
me too! i would really like the have the dates preserved.
stackoverflow shows 2 different approaches:
- extract the date from the zip file, then touch the extracted file
http://stackoverflow.com/questions/33910526/php-keep-the-modified-date-of-files-extracted-from-the-zip
- replace zip by tar
http://stackoverflow.com/questions/23600226/how-can-i-extract-files-from-a-zip-folder-using-php-while-retaining-the-files-or
-
This reply was modified 8 years, 2 months ago by
pdvnl.
to answer my own question:
to keep the last modified time for files:
1) a workaround is to manually extract the zip
2) insert before $close_response = $zip->close();
(line 214 in ajax.step1.php) the following
for ( $idx=0; $s = $zip->statIndex( $idx ); $idx++) {
touch( $target . DIRECTORY_SEPARATOR . $s['name'], $s['mtime'] );
}
the zip format has a limitation: the time stamp has a 1 second resolution, and for windows this may be 2 seconds.
Hey @pdvnl,
Thanks for providing a solution! We do have this item in the backlog, the problem is that the backlog is rather large and this item was closer to the bottom. However since you do have a possible solution we can try and get it moved up towards the top for the next release. I have also received your help ticket, so lets finish up the conversation there so we don’t loose scope on this request…
Thanks
This has been updated as a new feature in 1.1.30. The new setting is under the advanced options in step 1 of the installer. Please let us know if you run into any issues with the new option.
Thanks