jeanluca has asked for the wisdom of the Perl Monks concerning the following question:
Output:#! /usr/bin/perl -l use strict ; use warnings ; use Data::Dumper ; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); # Read a Zip file my $zip = Archive::Zip->new(); unless ( $zip->read( 'out.zip' ) == AZ_OK ) { die 'read error'; } my @members = $zip->members(); foreach my $element(@members) { printf("%d %s %s\n", $element->lastModFileDateTime(), scalar(localtime($element->lastModFileDateTime())), $element->fileName() ); }
However, here is the output from unzip983734011 Sun Mar 4 20:26:51 2001 dir3/ 983734011 Sun Mar 4 20:26:51 2001 dir3/file3
Note that the dates do not match. I guess there is a logical explanation for this, any suggestion ?$> unzip -l out.zip Archive: out.zip Length Date Time Name -------- ---- ---- ---- 0 05-02-09 18:55 dir3/ 0 05-02-09 18:55 dir3/file3 -------- ------- 0 2 files
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Archive::Zip returns incorrrect 'file last modified date'
by derby (Abbot) on Dec 10, 2009 at 18:58 UTC |