tc8.51a (x32) and older; FAT32 (may be NTFS too).
Two files with the difference in time =2 seconds, recognized as same!
Compare files by date bug: 2-seconds difference ===0
Moderators: Hacker, petermad, Stefan2, white
Compare files by date bug: 2-seconds difference ===0
Last edited by Isica on 2015-04-22, 07:11 UTC, edited 1 time in total.
Hi,
this effect is a limitation of the FAT32 file system, which has a file timestamp granularity of 2 seconds.
NTFS has a much finer granularity.
Cf following thread, where I had noticed this effect too and had assumed a TC bug then:
http://www.ghisler.ch/board/viewtopic.php?t=41930
Hubert
this effect is a limitation of the FAT32 file system, which has a file timestamp granularity of 2 seconds.
NTFS has a much finer granularity.
Cf following thread, where I had noticed this effect too and had assumed a TC bug then:
http://www.ghisler.ch/board/viewtopic.php?t=41930
Hubert
Please imagine following situation: you copy file from FAT to NTFS (or vice versa) and then run sync. Your files may have such time difference because FAT rounds seconds, but I'm sure you'll want to see that files are the same.
BTW it is interesting how did you get files with 2-second difference which are really different and this difference is important.
BTW it is interesting how did you get files with 2-second difference which are really different and this difference is important.
- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, a timestamp difference of up to 2 seconds is ignored. This is by design for the above reasons.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
2ghisler(Author)
If "up to 2 seconds" (<), then it is understandable. But why ignore the difference exactly 2 seconds? Bug?
2MVV
However, I did not study the behavior of the SetFileTime in different versions of the Windows
If "up to 2 seconds" (<), then it is understandable. But why ignore the difference exactly 2 seconds? Bug?
2MVV
NTFS provides file time with excessive precision. And if you adhere to a strict rounding algorithm, say, 00.0000--00.9999 seconds will always be equal to 0, and 01.0000--02.9999 equal to 2.Please imagine following situation: you copy file from FAT to NTFS (or vice versa) and then run sync. Your files may have such time difference because FAT rounds seconds, but I'm sure you'll want to see that files are the same.
However, I did not study the behavior of the SetFileTime in different versions of the Windows

- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
No, for example when you copy a file from NTFS to FAT32 with one program, pack to ZIP (also 2 seconds resolution) with some others and then unpack, you may get exactly 2 seconds difference. For example, one program may round up 1.99 seconds to 2, and other may just truncate to 0.But why ignore the difference exactly 2 seconds? Bug?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com