(++ for the sample). Interestingly, I see the other reported behaviour where the mtime is rounded down to even seconds:

$ echo foo > abc $ stat abc | grep Mod Modify: 2017-01-11 09:47:51.022907652 +0000 $ perl -M'IO::Compress::Zip qw(zip)' -e ' zip "abc" => "abc.zip" ' $ mkdir out $ cd out $ unzip ../abc.zip Archive: ../abc.zip inflating: abc $ stat abc | grep Mod Modify: 2017-01-11 09:47:50.000000000 +0000

Versions are:

And this from "unzip -v":

UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. +Send bug reports using http://www.info-zip.org/zip-bug.html; see README for + details. Latest sources and executables are at ftp://ftp.info-zip.org/pub/infoz +ip/ ; see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites. Compiled with gcc 5.0.0 20150210 (Red Hat 5.0.0-0.11) for Unix (Linux +ELF) on Feb 11 2015. UnZip special compilation options: COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported) SET_DIR_ATTRIB SYMLINKS (symbolic links supported, if RTL and file system per +mit) TIMESTAMP UNIXBACKUP USE_EF_UT_TIME USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported) USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported) UNICODE_SUPPORT [wide-chars, char coding: UTF-8] (handle UTF-8 + paths) MBCS-support (multibyte character support, MB_CUR_MAX = 6) LARGE_FILE_SUPPORT (large files over 2 GiB supported) ZIP64_SUPPORT (archives using Zip64 for large files supported) USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.6, 6-Sept-2 +010) VMS_TEXT_CONV [decryption, version 2.11 of 05 Jan 2007] UnZip and ZipInfo environment options: UNZIP: [none] UNZIPOPT: [none] ZIPINFO: [none] ZIPINFOOPT: [none]

I'm wondering if maybe it's something in the unzip. Is there a simple way to query the entries in the zipfile to see what its contents are to the resolution of seconds? (I never use zip/unzip so this is all beyond my realm)


In reply to Re^10: Archive::Zip Modify Date Oddity by hippo
in thread Archive::Zip Modify Date Oddity by lhchin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.