Bug in TC's Date Sort

English support forum

Moderators: Hacker, petermad, Stefan2, white

User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Bug in TC's Date Sort

Post by *romulous »

I have found a bug in TC (seen in both v5.51 & v6). When you click on the Date column to sort files by date, the sort does not work correctly. Instead of the most current one being first in the list, it is actually listed at number 8 or 9. Windows Explorer & my graphics viewer sort the files correctly, so the problem only exists in TC. I run Windows XP.
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

It works like it is supposed to on my Windows XP SP1 system. ;)
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Post by *romulous »

Sounds like it could be one of those tricky bugs to track down the cause for - it definitely doesn't work properly on my SP1. For some reason, TC thinks that a file modified at 1:00:44 is later than a file modified at 1:00:45 (created 2:40:54 & 2:40:55 the day before respectively), & thus puts the :44 file ahead of the :45 in the date sort. I use the date sort quite frequently, so this is quite annoying for me :-(
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

romulous wrote:Sounds like it could be one of those tricky bugs to track down the cause for - it definitely doesn't work properly on my SP1. For some reason, TC thinks that a file modified at 1:00:44 is later than a file modified at 1:00:45 (created 2:40:54 & 2:40:55 the day before respectively), & thus puts the :44 file ahead of the :45 in the date sort. I use the date sort quite frequently, so this is quite annoying for me :-(
I only checked the dates before. I just checked the times and they work like they are supposed to, too. There must be something else going on somewhere to cause that. Check you time setup in Windows and see if everything is all right there. Other than that, I'm lost as to the cause. Sorry I couldn't be of more help. ;)
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Post by *romulous »

Hm, I just checked the time setup, & the time is correct, date is correct, time zone is ok. The only thing I can think of is it may be related to the "Ignore 1 Hour Time Delay" setting in TC (Options-Operation-NTFS Daylight Saving Correction), though I have no idea how - I've read the description of it in TC help & it seems to be only for file synchronization. Does your TC show the 24 hour time, or the 12 hour AM/PM format? Mine shows the 24 hour format in the TC window, but the 12 hour format when you right click on the file & go into properties. As I said before though, the native Windows Explorer date sorts the files fine, it is just TC that has the problem. Very puzzling.
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

Mine shows the 12 hour AM/PM format in both the TC window and the right-click Properties. I have it set that way in the Configuration for TC. Try setting it in TC for the 12 hour AM/PM format and see if that fixes the problem.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC cannot sort by the second, only with 2 second details. Why? Internally it uses FAT32 date/time representation, which is only 2 seconds exact.
Author of Total Commander
https://www.ghisler.com
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

Ahhh, I didn't know that. I've never run into that before, I guess. Good to know. Thank you. ;)
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Post by *romulous »

Ah, ok then. So this is a bug in TC because it's not designed to sort by the second? Can this be changed in a future version to be like Windows Explorer, which has no problem here?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately not - this is needed for compatibility reasons.
Author of Total Commander
https://www.ghisler.com
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Post by *romulous »

Hi Christian,

Can I ask what exactly is TC trying to be compatible with? The date sort works ok on some files, on others it has the bug as I described. As I mentioned, this is a big problem for me because I use the date sort very frequently, in conjuction with an external file viewing program, & this bug causes a mismatch between what TC says should be the next file shown & what file is actually shown by the external program (which sorts them correctly), making the use of TC for this purpose useless. So it would be interesting to know why this bug needs to be kept in TC, especially as the native Windows Explorer works fine in this regard.
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 19-11-2003 07:45:54 +0000 romulous wrote:

r> For some reason, TC thinks that a file modified at 1:00:44
r> is later than a file modified at 1:00:45 (created 2:40:54 &
r> 2:40:55 the day before respectively), & thus puts the :44
r> file ahead of the :45 in the date sort.


What are the complete timestamps of those files (including year in 4-digit format)?[/face]
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Post by *romulous »

An example is:
Created: 17 December 2003 5:52:58PM
Modified: 17 December 2003 5:41:44PM
(from File-Properties), but listed in just the TC window as:
17/12/03 17:41
The above file is listed as being LATER than this one:
Created: 17 December 2003 5:52:58PM
Modified: 17 December 2003 5:41:45PM
(from File-Properties), but listed in just the TC window as:
17/12/03 17:41
This is plainly incorrect. Last time I checked, 5:41:45 was created later than 5:41:44, not the other way around as TC suggests.
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Post by *romulous »

The odd thing is that I don't recall previous versions of TC having this bug. I know it occurred in the v5.5x series, but I'm nearly 100% sure that some of the prior versions to this worked fine. Sadly, TC is now all over the place with its date sorts (half the time the files are sorted correctly, half the time they aren't), making this feature unusable. Time for me to go look at other file managers seeing as Christian has stated that this bug won't be fixed. It would be nice to know exactly what TC is trying to be compatible with - especially as I've stated, the native Windows Explorer works fine. Anyone shed some light on this?
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

what exactly is TC trying to be compatible with?
TC is trying to be compatible with time/date related functions provided in Windows versions that did not suport NTFS. For instance there is one function in all windows versions that can be used to set the date using two-second precision. There is, however, another, newer function in W2K upwards that supports a higher precision. So Christian would have to check what system TC is being currently run on and use the appropriate function. That wouldn't be that difficult, however, these functions expect dates and times in another format, so TC would have to convert the timestamps each time or store them in various formats, etc.
To sum up, there'd be too many problems (not mentioning the DST adjustment used on NTFS, etc.),

Concerning Explorer, Explorer doesn't equal Explorer. I doubt XP's Explorer would sort these dates correctly on W95, nay it would run on that platform, and vice versa.

HTH
Roman
Post Reply