use Archive::Zip; my $zip = Archive::Zip->new(); $zip->addFile($0,'test.txt'); $zip->writeToFileNamed('test.zip');
Save the above code as zip.pm and run the following command and grep original and post zip Modify date to compare.
Perl Library Zipped file extracted is always 1 second behind original modify file? Is this a bug with the library???
stat zip.pm | grep Modify && perl zip.pm && unzip test.zip && stat test.txt| grep Modify && rm test.*
Output
Modify: 2017-01-03 01:15:55.000000000 -0800
Archive: test.zip
inflating: test.txt
Modify: 2017-01-03 01:15:54.000000000 -0800
In reply to Archive::Zip Modify Date Oddity by lhchin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |