aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archival/unzip.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/archival/unzip.c b/archival/unzip.c
index a7532e0ff..be32e60e2 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -642,14 +642,14 @@ int unzip_main(int argc, char **argv)
642 } else { 642 } else {
643 if (listing) { 643 if (listing) {
644 /* List entry */ 644 /* List entry */
645 unsigned dostime = zip_header.formatted.modtime | (zip_header.formatted.moddate << 16);
646 char dtbuf[sizeof("mm-dd-yyyy hh:mm")]; 645 char dtbuf[sizeof("mm-dd-yyyy hh:mm")];
647 sprintf(dtbuf, "%02u-%02u-%04u %02u:%02u", 646 sprintf(dtbuf, "%02u-%02u-%04u %02u:%02u",
648 (dostime & 0x01e00000) >> 21, 647 (zip_header.formatted.moddate >> 5) & 0xf, // mm: 0x01e0
649 (dostime & 0x001f0000) >> 16, 648 (zip_header.formatted.moddate) & 0x1f, // dd: 0x001f
650 ((dostime & 0xfe000000) >> 25) + 1980, 649 (zip_header.formatted.moddate >> 9) + 1980, // yy: 0xfe00
651 (dostime & 0x0000f800) >> 11, 650 (zip_header.formatted.modtime >> 11), // hh: 0xf800
652 (dostime & 0x000007e0) >> 5 651 (zip_header.formatted.modtime >> 5) & 0x3f // mm: 0x07e0
652 // seconds/2 are not shown, encoded in ----------- 0x001f
653 ); 653 );
654 if (!verbose) { 654 if (!verbose) {
655 // " Length Date Time Name\n" 655 // " Length Date Time Name\n"