Thanks for the result, but this is what I am getting,
first is the shell zip, which retained the timestamp.
next is perl zip which timestamp became current.
lastly is perl zip with extime which timestamp rounded down to even seconds.
OS RHEL
$ stat abc | grep Mod
Modify: 2017-01-09 18:46:05.000000000 -0800
$ zip abc.zip abc
adding: abc (stored 0%)
$ unzip abc.zip
Archive: abc.zip
replace abc? [y]es, [n]o, [A]ll, [N]one, [r]ename: r
new name: abc2
extracting: abc2
$ stat abc2 | grep Mod
Modify: 2017-01-09 18:46:05.000000000 -0800
$ rm abc.zip
$ perl -M'IO::Compress::Zip qw(zip)' -e ' zip "abc" => "abc.zip" '
$ unzip abc.zip
Archive: abc.zip
replace abc? [y]es, [n]o, [A]ll, [N]one, [r]ename: r
new name: abc3
inflating: abc3
$ stat abc3 | grep Mod
Modify: 2017-01-10 15:54:35.000000000 -0800
$ rm abc.zip
$ perl -M'IO::Compress::Zip qw(zip)' -e ' zip "abc" => "abc.zip", exT
+ime => [$atime, $mtime, $ctime] '
$ unzip abc.zip
Archive: abc.zip
replace abc? [y]es, [n]o, [A]ll, [N]one, [r]ename: r
new name: abc4
inflating: abc4
$ stat abc4 | grep Mod
Modify: 2017-01-09 18:46:04.000000000 -0800
|