1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-07-31 12:40:09 +02:00

fix incorrect time in archive

This commit is contained in:
Ne-Lexa
2017-03-15 19:03:04 +03:00
parent 67fc1ea7ad
commit 1b065c4cca
8 changed files with 94 additions and 52 deletions

View File

@@ -96,7 +96,7 @@ class ZipReadEntry extends ZipAbstractEntry
$this->setPlatform($data['versionMadeBy'] >> 8);
$this->setGeneralPurposeBitFlags($data['gpbf']);
$this->setMethod($data['rawMethod']);
$this->setTime($data['rawTime']);
$this->setDosTime($data['rawTime']);
$this->setCrc($data['rawCrc']);
$this->setCompressedSize($data['rawCompressedSize']);
$this->setSize($data['rawSize']);
@@ -282,7 +282,7 @@ class ZipReadEntry extends ZipAbstractEntry
$this->getMethod(),
// last mod file time 2 bytes
// last mod file date 2 bytes
$this->getTime(),
$this->getDosTime(),
// crc-32 4 bytes
$dd ? 0 : $this->getCrc(),
// compressed size 4 bytes