unzip shows the wrong date for zip files created on windows

Bug #1004368 reported by Ferry Toth on 2012-05-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unzip (Ubuntu)
Undecided
Unassigned

Bug Description

I have a zip file created by winzip. Later using winzip files were replaced.

Both windows built-in zip viewer and winzip show the replaced files dates of the newly replaced file.

On ubuntu precise the old date (of the original files) are shown.

Using zipinfo -v I have listed the info in the zip file (only the info of 1 file shown here for clarity), see below.
It appears that there are 3 file modification dates stored, of which windows uses the DOS Date/Time (as they would) and unzip uses the UT extra field time.

However, on replacing the file winzip appearently has chosen to update only tyhe DOS Date/Time field.

This may be a bug of winzip, it is however causing problems for Ubuntu users.

The expected behavior would be:
- if the file is created on DOS/Windows ( file system or operating system of origin: MS-DOS, OS/2 or NT FAT)
- use file last modified on (DOS date/time).

Ferry

output of zipinfo:
++++++++++++++

zipinfo -v GRB-120411
Archive: GRB-120411.zip
There is no zipfile comment.

End-of-central-directory record:
-------------------------------

  Zip archive file size: 24810 (00000000000060EAh)
  Actual end-cent-dir record offset: 24788 (00000000000060D4h)
  Expected end-cent-dir record offset: 24788 (00000000000060D4h)
  (based on the length of the central directory and its expected offset)

  This zipfile constitutes the sole disk of a single-part archive; its
  central directory contains 5 entries.
  The central directory is 416 (00000000000001A0h) bytes long,
  and its (expected) offset in bytes from the beginning of the zipfile
  is 24372 (0000000000005F34h).

Central directory entry #1:
---------------------------

  120411-1-2-np.drl

  offset of local header from start of archive: 0
                                                  (0000000000000000h) bytes
  file system or operating system of origin: MS-DOS, OS/2 or NT FAT
  version of encoding software: 2.0
  minimum file system compatibility required: MS-DOS, OS/2 or NT FAT
  minimum software version required to extract: 2.0
  compression method: deflated
  compression sub-type (deflation): normal
  file security status: not encrypted
  extended local header: no
  file last modified on (DOS date/time): 2012 May 7 15:29:06
  file last modified on (UT extra field modtime): 2012 Apr 23 13:45:44 local
  file last modified on (UT extra field modtime): 2012 Apr 23 11:45:44 UTC
  32-bit CRC value (hex): 672661c0
  compressed size: 262 bytes
  uncompressed size: 518 bytes
  length of filename: 17 characters
  length of extra field: 24 bytes
  length of file comment: 0 characters
  disk number on which file begins: disk 1
  apparent file type: text
  non-MSDOS external file attributes: 81B600 hex
  MS-DOS file attributes (20 hex): arc

  The central-directory extra field contains:
  - A subfield with ID 0x5455 (universal time) and 5 data bytes.
    The local extra field has UTC/GMT modification/access times.
  - A subfield with ID 0x7875 (Unix UID/GID (any size)) and 11 data bytes:
    01 04 e9 03 00 00 04 e9 03 00 00.

  There is no file comment.
++++++
lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04
++++++++++++++++++
apt-cache policy unzip
unzip:
  Geïnstalleerd: 6.0-4ubuntu1
  Kandidaat: 6.0-4ubuntu1
  Versietabel:
 *** 6.0-4ubuntu1 0
        500 http://nl.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
        100 /var/lib/dpkg/status

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers