[11.5x] RAR vs 7z + no mod/create/access time

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

User avatar
MaxX
Power Member
Power Member
Posts: 1199
Joined: 2012-03-23, 18:15 UTC
Location: UA

[11.5x] RAR vs 7z + no mod/create/access time

Post by *MaxX »

First you'll need an archive without mod/create/access time+date for files inside.

For 7zip you can add:
-mtm=off -mtc=off -mta=off -mtr=off

For Rar:
-tsm- -tsc- -tsa-

Then just open these archives.

You'll see "?" mark for 7z (expected), and "01.01.1985 02:00" for RAR (should be "?" too).
Please, add this small fix for Rar. There should be no date in this case.

P.S.
Also I remember some old archives from my old Nokia (~2007, Symbian OS) without date/time for files inside that zip. I got empty string (or "?"), too.
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50937
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *ghisler(Author) »

That's odd, I'm getting ? for the date also in the RAR file.
Alt+Enter on a file in the RAR archived showed Packer: rar4
Therefore I repeated the packing with switches to set rar5 format: -tsm- -tsc- -tsa- -ma5
But even then the date was shown as "?".
The test was made with WinRAR 6.24 64-bit. Maybe you used a different version, or had other switches in the rar.ini, or used a plugin to open it?
Author of Total Commander
https://www.ghisler.com
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7028
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *Horst.Epp »

I don't see a reason to have files with no date info inside any archive.
What's the case to want this ?
Windows 11 Home, Version 24H2 (OS Build 26100.4484)
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1396a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.6 x64
User avatar
MaxX
Power Member
Power Member
Posts: 1199
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *MaxX »

I tested this with both ver.6.24 and ver.7.11, archives are identical.

"C:\Program Files\WinRar\Rar.exe" a -m5 -tsm- -tsc- -tsa- test.rar Win11_Disable_Recall.txt

Sample files:
https://0x0.st/86hH.zip

Both 11.51 and 11.55 RC7 (both 32 and 64 bits) act the same way, show "?" in 7z (ok) and the wierd date in Rar (bad):
https://i.ibb.co/9kDcLg1v/7z.png
https://i.ibb.co/TB700kVX/rar.png
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
MaxX
Power Member
Power Member
Posts: 1199
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *MaxX »

UPD:
I also checked with empty wincmd.ini and got no difference there.
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50937
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *ghisler(Author) »

I checked your files, and Total Commander shows ? in the date column for both.
When you press Alt+Enter on "Win11_Disable_Recall.txt" in the RAR file, what does it show in the packer field? It should show the plugin if one is used. Here it shows "rar4" for the internal rar 4 unpacker.
Author of Total Commander
https://www.ghisler.com
User avatar
MaxX
Power Member
Power Member
Posts: 1199
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *MaxX »

It should be rar 5 format there, not rar 4.
https://i.ibb.co/2168pnQR/empty-ini.png
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
AntonyD
Power Member
Power Member
Posts: 1678
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *AntonyD »

Strange thing is that - if we will call the same "Properties" dialog above the packed file inside the 7z archive
we in fact WILL see the date-time! Only it will be 01.01.9999 00:00:00 and not "?" as we see in a file panels!
But I would expect here to see just simple "-----" in both fields, btw!
#146217 personal license
User avatar
norfie²
Power Member
Power Member
Posts: 1042
Joined: 2006-02-10, 07:27 UTC

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *norfie² »

TCmd V11.55RC7 x32 and x64 - both display "01.01.1985 01:00" on Windows 11 x64 with a fresh wincmd.ini here i.e. it has nothing to do with any plugin.
"War is evil, in so far as it makes more bad people than it takes away."
Immanuel Kant in "Perpetual Peace"
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50937
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *ghisler(Author) »

Sorry, I had renamed the unrar dll to test unpacking RAR files with the tc7z dll! I can reproduce the problem with the unrar.dll but unfortunately it seems to be a bug in it:

Total Commander calls RARReadHeaderEx to get entry details from RAR files. There are two fields for the date in the RARHeaderDataEx structure:
1. The older FileTime in FAT format (32 bit)
2. The newer MtimeLow/MtimeHigh fields in Windows time.
The problem is that the newer fields are missing when using older unrar.dll versions. So Total Commander checks whether they are zero, and if yes, uses the older FileTime field instead.

In your file, the two fields MtimeLow/MtimeHigh are indeed zero, but not because the fields are missing, but because there is no file time stored. Unfortunately FileTime is NOT zero, it's instead set to 0xA210800 (hexadecimal), which translates to 01.01.1985 02:00.

The new fields MtimeLow/MtimeHigh were introduced with unrar dll 5.50 in June 2016, so I guess I should just ignore the FileTime field. Users who switch back to an old unrar dll (5.40 or older) would get all 0 dates then.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1678
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *AntonyD »

2ghisler(Author)
and what about case with 01.01.9999 00:00:00 from 7z archive ???
Last edited by AntonyD on 2025-06-23, 08:59 UTC, edited 1 time in total.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50937
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *ghisler(Author) »

That happens because the properties dialog didn't handle a timestamp of 0 in a special way. I already fixed that when fixing the other problem.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50937
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *ghisler(Author) »

This should be fixed in Total Commander 11.55 final, please check it!
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1678
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *AntonyD »

Confirm as a fixed one.
#146217 personal license
User avatar
MaxX
Power Member
Power Member
Posts: 1199
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: [11.5x] RAR vs 7z + no mod/create/access time

Post by *MaxX »

Also confirm the fix in both x32 and x64. Thanks.

But...
I noticed difference there
https://i.ibb.co/Kxdzb4X8/32.png
https://i.ibb.co/Mx158pfN/64.png
1. Color background
2. Window icon

It looks the same in 11.51 version.
Ukrainian Total Commander Translator. Feedback and discuss.
Post Reply