- Notifications
You must be signed in to change notification settings - Fork8k
Closed
Labels
Description
Description
Having a file created this day (2023-03-03) namedmyfile.txt
in/tmp
directory.
The following code:
<?php$a =new \PharData('/tmp/archive.zip', \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS,null, \Phar::ZIP);$a->addFile('/tmp/myfile.txt','name');$b =new \PharData('/tmp/archive.tar', \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS,null, \Phar::TAR);$b->addFile('/tmp/myfile.txt','name');
Resulted in this output (uncompress '/tmp/archive.zip' archive):
name 1980-01-01
But I expected this output instead (uncompress '/tmp/archive.tar' archive):
name 2023-03-03
PHP Version
PHP 8.2.0
Operating System
MacOS 13.2