Menu ▾ ▴

#1701 Add a switch/option to ignore sub-second time differences (truncate/round to full seconds) during 7z u updates

open
nobody
None
5
2026-10-27
2026-10-21
Sebas
No

When running differential updates using the 7z u command (especially with the standard -tzip (and -t7z) format or when comparing against network shares, SD cards, and NTFS file systems), 7-Zip triggers false-positive updates for files that have identical content (CRC/SHA) but slight timestamp discrepancies.

This happens because:

  1. NTFS, modern storage drivers, network file systems (SMB/NFS), and flash storage (SD cards) often store and report file modification times with high sub-second precision (milliseconds or 100-nanosecond ticks).
  2. Standard ZIP archives (and various extraction engines) handle timestamps with lower granularity (typically 2-second resolution or truncated milliseconds).
  3. When files are extracted from an archive to an NTFS volume, network share, or SD card, the file system assigns current sub-second ticks to the extracted files.
  4. Tool comparison context: Other file managers (such as Total Commander) successfully perform comparisons without false positives because their comparison engines naturally truncate or ignore sub-second time fractions. In contrast, 7-Zip strictly enforces exact timestamp matching.

Consequently, a subsequent 7z u comparison flags every single file as modified due to these sub-second fractions, even though the content and full-second timestamps are completely identical. The current -stl switch only sets the archive's timestamp to the newest file, but does not help with comparing file system timestamps against archive entries.

Proposed Solution:
Introduce a new command-line switch (for example, -ts-sec or -stl-trunc / time tolerance option) that forces 7-Zip to truncate or round file modification times down to whole seconds during comparison operations in update (u) mode.

Benefits:

  • Eliminates massive false-positive updates caused by file system timestamp precision differences, bringing behavior in line with other utilities like Total Commander.
  • Solves cross-platform and cross-filesystem timestamp discrepancies (e.g., between ZIP headers and modern file systems).
  • Keeps source files untouched (no need for external scripts to alter file modification ticks).

ps
As on my screen - left side - files packed with tc-zip, right side - real files on ntfs.
Total Commander see no differences.

1 Attachments

Discussion

  • Sebas

    Sebas - 2026-10-21

    i forgot attach the same comparision, but in total commander

     
  • Sebas

    Sebas - 2026-10-27

    I'm just noticed, there is such option named "timestamp precision" in file manager version, but can't find similar option in command line 7z.exe version.

     

Log in to post a comment.