Wrong timestamp in RAR files modified in other time zone

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

Moderators: white, Hacker, petermad, Stefan2

User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

Eugene_Roshal wrote:What additional information do you need for FILETIME in UTC format?
I mean rar 2.9 (not rar5) and the possibility of an additional flag to signal the new timestamp adjustment I mentioned earlier.
This was in reply to Ghisler asking for how to identify rar5 archives.
Eugene_Roshal wrote:How would such flag help if old style conversion still can produce 1 hour error for old archives. I mentioned it by few messages above. If you leave 2.9 unaltered, both old and new archives can be affected by 1 hour error.
I understood what you mean. But like I said: was there really a need to alter the 2.9 behavior? You had the rar5 format with UTC out, where you had to alter things anyway, but you still changed the old 2.9 format behavior. IMO, leaving a known behavior – even if it's incorrect to some degree – unaltered is better than changing it unexpectedly.
TC plugins: PCREsearch and RegXtract
Eugene_Roshal
Junior Member
Junior Member
Posts: 14
Joined: 2013-05-02, 09:58 UTC
Contact:

Post by *Eugene_Roshal »

milo1012 wrote:I understood what you mean. But like I said: was there really a need to alter the 2.9 behavior?
Yes, it was. Users complained that file times displayed by WinRAR in newly created archives do not match times of same files displayed by Explorer.

And more serious issue, I copied the text below from old user email:
I have a problem with the console version of RAR. I have a couple of large archives that are made before the DST (Daylight Saving Time) kicked in. When I update these archives now, (I use the commend "Rar.exe u -as -r -ep2 -m5 -dh") all files are updated, because RAR seems to think the current file is an hour younger then the archived one.
It was considered as a bug by many users.
milo1012 wrote:You had the rar5 format with UTC out, where you had to alter things anyway, but you still changed the old 2.9 format behavior.
It takes years until the new archive format is adopted by users and software developers. We plan to propose RAR5 format enabled by default only in upcoming WinRAR 5.50 version, 4 years after RAR5 introduction. If we did it in 2013, we would annoy a lot of users, who could not unpack RAR5 archives with different third party unarchiving tools. I suppose, a larger part of .rar archives is still created in RAR4 format now and 4 years is a lot of time to not fix the problem.
milo1012 wrote:IMO, leaving a known behavior – even if it's incorrect to some degree – unaltered is better than changing it unexpectedly.
It depends on the degree of incorrectness and at some moment amount of user bug reports was too high to ignore them.
mikeyww
Junior Member
Junior Member
Posts: 41
Joined: 2005-07-02, 02:58 UTC

Post by *mikeyww »

Another file manager that displays the right file times: Directory Opus 12.3.

Mike
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

mikeyww wrote:Another file manager that displays the right file times: Directory Opus 12.3.
Does your Directory Opus display time for summer archives in winter properly? :wink:
I don't understand how can you tell that program X shows correct time and program Y doesn't when you have agreed that it is impossible to show absolutely correct time? What do you call right file time?
User avatar
Stefan2
Power Member
Power Member
Posts: 4132
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

2Eugene_Roshal and @All

How about an RAR command line parameter like -AdjustTimestamp:+1

So if the user see an 'wrong' file time, he can use that command to unpack and adjust the times tamp in one step (on second unpacking).



Just an BTW idea.


 
mikeyww
Junior Member
Junior Member
Posts: 41
Joined: 2005-07-02, 02:58 UTC

Post by *mikeyww »

The problem is not with unpacking. The problem is with the display of packed files.

As I also noted, the programs that I have indicated as providing display of correct times-- including Directory Opus-- show the correct times for newly archived files, regardless of whether the files were last modified in Daylight Savings Time. Therefore, in the winter, these programs display the correct time for files last modified in either the summer or the winter. It is possible that older archives will show incorrect times, but we do not care as much about those. The right file time is the last modification time of the file before it was packed. Programs showing the incorrect time are showing a different time inside the archive after the file is packed, for files last modified in a different time zone (e.g., files modified in summer and displayed in winter).

The identification of three working file managers indicates that the correct file times can be displayed without any intervention from the user or the configuration file.

Mike
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

As I see it, you need some RAR29 test archive with a file that was added in winter and a file that was added in summer (using older WinRAR version). And no one program will ever be able to show both times correctly because there is no information about DST in RAR29 timestamps.

So either both times will be incorrect (if you have another time zone) or one of the two files will have incorrect timestamp, depending on current season and error correction method.

And the only way of minimizing error is converting timestamps to pure local zone time (w/o DST shift) during adding files to archive and converting back to local zone+DST time during reading archive contents.
mikeyww
Junior Member
Junior Member
Posts: 41
Joined: 2005-07-02, 02:58 UTC

Post by *mikeyww »

Thanks. We are going around in circles here with the explanations.

1. We have provided a sample file that demonstrates the problem. Users may also create and test their own samples if they believe that the provided sample is somehow incomplete or inadequate.

2. We have provided a technique to fix the problem.

3. We have indicated a priority to show the correct times in newer archives, rather than older archives.

4. We have provided examples of three programs that work: they show the correct times for files last modified in summer or winter. Users may freely run these programs to verify their working conditions.

That should do it, right?

Mike
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Not having dived into the problem too deeply, I have a question - say I create a file at a given date X and time Y (where date and time is what I see when I look at the clock in windows or my wristwatch for that matter) and pack it. Is there a way that regardless of what time and date it is now, what time zone I am currently in and if it is DST or not, I always see the packed file's date as X and time as Y? I would pretty much prefer it that way.

This is also a general question, not only RAR-specific, since from my tests a few years ago it seems NewTimeZoneMethod does not help me to achieve the above specified goal, either.

Thanks
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Hacker,
Your goal may be achieved by using old simple local times w/o any DST shifts and conversions to UTC, and it is how old archivers have worked...
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

MVV,
Yes, that's the way it worked under XP etc., but my question is if this can somehow be achieved now, with Windows 10 and current archivers.
Sorry if I have hijacked the thread.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I doubt that you can because it is more important today to have zone-independent time... e.g. imagine that you add some files to archive created in another time zone... you will get a mess of timestamps.
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

MVV,
I do not consider that a problem at all. Exactly the opposite, actually. If I take a photo of a sunset in Kuala Lumpur at 20:30 local time and in Iceland at 19:45 local time I want to see those exact timestamps at home, too, not 13:30 nor 18:45. (Please don't mention EXIF.)

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks, Eugene, I will add it to the next version of TC.
Author of Total Commander
https://www.ghisler.com
browny
Senior Member
Senior Member
Posts: 287
Joined: 2007-09-10, 13:19 UTC

Post by *browny »

Hacker wrote:local time I want to see those exact timestamps at home
Impossible, I guess. RAR 5.0 file format description does not mention time zone data.
Hacker wrote:a sunset in Kuala Lumpur at 20:30 local time
At that time and place sun should be below horizon for over an hour already. Not a sunset, not even twilight 8)
Post Reply