lhchin has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Archive::Zip Modify Date Oddity
by Corion (Patriarch) on Jan 03, 2017 at 09:32 UTC | |
by lhchin (Novice) on Jan 04, 2017 at 00:29 UTC | |
by pmqs (Friar) on Jan 04, 2017 at 10:46 UTC | |
by lhchin (Novice) on Jan 05, 2017 at 08:34 UTC | |
by pmqs (Friar) on Jan 05, 2017 at 09:13 UTC | |
| |
by Corion (Patriarch) on Jan 05, 2017 at 08:38 UTC |