From b8740f06bd446d4e860f18a647f794365685e114 Mon Sep 17 00:00:00 2001 From: Thijs Ubbink | Mobiel Bekeken Date: Thu, 31 Jul 2025 14:05:09 +0200 Subject: [PATCH] bugfix modification time is incorrect --- src/Tar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tar.php b/src/Tar.php index ce4b146..cea3ed8 100644 --- a/src/Tar.php +++ b/src/Tar.php @@ -601,7 +601,7 @@ protected function writeRawFileHeader($name, $uid, $gid, $perm, $size, $mtime, $ $gid = sprintf("%6s ", decoct($gid)); $perm = sprintf("%6s ", decoct($perm)); $size = self::numberEncode($size, 12); - $mtime = self::numberEncode($size, 12); + $mtime = self::numberEncode($mtime, 12); $data_first = pack("a100a8a8a8a12A12", $name, $perm, $uid, $gid, $size, $mtime); $data_last = pack("a1a100a6a2a32a32a8a8a155a12", $typeflag, '', 'ustar', '', '', '', '', '', $prefix, "");