ghisler(Author) wrote: 2021-12-31, 08:41 UTC
It sounds like they store NTFS timestamps in an extra field, because the ZIP timestamps only have enough space for DOS timestamps (with a 2 second resolution instead of 100 nanosecond resolution).
That is correct and confirmed. Igor Pavlov (7-zip.org) said on 2014-10-09:
7-Zip uses extra fields from central directory at the end of ZIP archive.
There are two possible extra UTC fields:
- Unix UTC
- NTFS UTC
ZIP (like old FAT) uses 2 sec. precision for timestamps. There is extension (extra fileds) to ZIP format that allows better precision.
https://sourceforge.net/p/sevenzip/discussion/45797/thread/7fe2e341/#440f
Some interesting info:
At the time MS-DOS was created, timezone was not being used on those computers (Unix already had the concept, though, since 1970.) People who used MS-DOS were often in their office or at home and did not communicate with people in other states let alone other countries via the computer. Intranet was pretty expensive too at the time.
The company that created the zip file format made the mistake of using the FAT file system date format and it stuck. So zip files are created using local time (it doesn't have to, but it's the expected behavior, at least.)
The zip format offers ways to add extensions, though, including various timestamps.
…
As we can see, the NTFS and Unix blocks clearly define their timestamp as using UTC. The NTFS date has more precision (100ms) than the Unix timestamps (1s), it will also survive much longer since it uses 64 bits (see Year 2038 Problem for further details on the 32 bit timestamps).
https://stackoverflow.com/questions/26045471/system-io-compression-zip-doesnt-use-utc/55568458#55568458