xref: /PHP-8.2/ext/zip/tests/bug50678.phpt (revision 74859783)
1--TEST--
2Bug #50678 (files extracted by ZipArchive class lost their original modified time)
3--EXTENSIONS--
4zip
5--INI--
6date.timezone=UTC
7--FILE--
8<?php
9$filename = __DIR__ . '/test.zip';
10$dirname = __DIR__ . '/bug50678';
11
12@mkdir($dirname);
13
14$zip = new ZipArchive();
15$zip->open($filename);
16$zip->extractTo($dirname);
17$zip->close();
18
19var_dump(date('Ym', filemtime($dirname . '/entry1.txt')));
20?>
21Done
22--EXPECT--
23string(6) "200607"
24Done
25--CLEAN--
26<?php
27include __DIR__ . '/utils.inc';
28rmdir_rf(__DIR__ . '/bug50678');
29?>
30