Pablo
Pablo

Reputation: 29519

date/time attributes in zip format

I am trying to find out whether file and directory creation date is stored into zip file. From what I can see using zipinfo is only modification time.

Upvotes: 1

Views: 2509

Answers (2)

EvgenKo423
EvgenKo423

Reputation: 3010

As has been said in another answer, by default ZIP file can only store the modification date of a file. Any additional metadata, including file creation date, can be stored in extra field. And it IS standardized to some extent, so different archivers can understand each other.
Some of the most commonly used extra blocks are described in PKWARE's official ZIP file specification and the most complete documentation can be found in Info-ZIP's extra field description.

However, on most UNIX(-like) systems there is no creation time at all, with some of them providing it with OS-specific extensions. It may be that the file you was inspecting had been created in OS with no creation time or the archiving software used didn't bother to support it on UNIX.

Upvotes: 0

zopieux
zopieux

Reputation: 2901

The Wikipedia page for the Zip file format explains that all files must have a modification date/time field. There is no creation date/time field. However, you can store whatever metadata you like using the Extra field, but this is not standardized whatsoever.

Upvotes: 1

Related Questions