From e49f0752f2a9f0864b15c81b237a9bb392519da6 Mon Sep 17 00:00:00 2001 From: Brian Carcich Date: Tue, 5 Apr 2011 09:20:41 +0200 Subject: [PATCH] Minor fix for rare occurrence: zipping files with dates <1981 --- libraries/zip.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/zip.lib.php b/libraries/zip.lib.php index c6ac6e509..a8bcb98d0 100644 --- a/libraries/zip.lib.php +++ b/libraries/zip.lib.php @@ -96,7 +96,7 @@ class zipfile { $name = str_replace('\\', '/', $name); - $dtime = dechex($this->unix2DosTime($time)); + $dtime = substr( "00000000" . dechex($this->unix2DosTime($time)), -8); $hexdtime = '\x' . $dtime[6] . $dtime[7] . '\x' . $dtime[4] . $dtime[5] . '\x' . $dtime[2] . $dtime[3]