Confusing +1 hour datetime
A free file archiver for extremely high compression
Brought to you by:
ipavlov
In 7-Zip application there are shown datetime of files +1 hour. It does not affect when files will be compressed and decompressed. It's only about showing datetime in 7-zip. It is confusing, when You compare dates of files in archive vs dates of files out of archive... see attachement...
It's not critical, It's low priority, but "repair" will remove confusion in the interpretation and comparing of the datetime by looking user.
Thanks for consideration.
It's "Daylight saving time" clock change problem.
7-Zip shows timestamp in current zone offset.
Another programs (and Explorer) probably can show timestamp in old zone offset.
Note some case of that problem:
1) you change
file1.txt
at 02:40 before clock change.2) you move your clock at 03:00 back to 02:00.
3) you change
file2.txt
at 02:20 after clock change.What timestamps to show for these files?
How user can detect what file was changed before another when he sees "02:20 and 02:40" for two files?
7-Zip just can show for them: "01:40 and 02:20" or "02:40 and 03:20". So we always know what file was changed before another.
Please correct me, if I'm missing something.
You can write that you don't change files between 02:00 and 03:00.
But note that when you have night at 02:30, there are some another time zones where it's not night, and users from these zones can change files, compressed them to archive, and send that archive to you. These timestamps in archives are in UTC. So no problem, we know real time, but programs show timestamps in local time, that is more comfortable for users.
When we use current zone offset only, the code is simple. 7-Zip works so.
When we try to detect local time for timezone that was in past, the code is more difficult, and we must rememer all timezone offset changes in past. Explorer works so.
Last edit: Igor Pavlov 2019-04-08
Thanks for explanation.
I read more about It and understand NTFS stored file time in UTC and Windows (respectively Explorer) show local time. Is it exists some function for showing local time? If Windows do it, I think there may be some Windows function which could be used... It's about only showing not storing.
I understand, UTC is the right time for storing, because of timezones and daylight saving time, but in my opinion is that for showing filetime (time that user see) should be used local time respecting relevant time shift.
BUT I undesrtand 7-Zip is multiplatform application and this may be probably Windows only specific, so if it not be simple or if it would "broke" part of united multiplatfom code, forget and close this ticket.
Thank you again for response
and
Thank you for the good work on 7-Zip.
p.s.: For part of World, specifically EU, it may be soluted by the comming future, because EU canceling daylight saving time, but implementation will take at least another year, maybe two. But as we know, one year the officials will cancel something and return it for another.
Yes, there is such function.
But you will have problems still with that function in some cases.
For example, someone each day at 00:30 UTC creates file, compresses it to archive, and sends archive to you.
You unpacks all files and look timestamps in your local timezone with +1 hour offset. Some files will be 00:30 and some files will be 01:30 in explorer.
That is not good too as I suppose.
In 7-Zip you will see same timestamp (00:30 or 01:30) for all files.
Last edit: Igor Pavlov 2019-04-10