Some zipped files have wrong timestamp by one hour
A free file archiver for extremely high compression
Brought to you by:
ipavlov
I have some strange behavior here. I have two files with last changed timestamp 03.12.2009 13:10 and the other one with 27.08.2009 18:47. The one with 18:47 is shown with timestamp 17:47 after zipped with 7-zip in zip format, the other one is correctly shown with timestamp 13:10 after zipped with 7-zip in zip-format. When unzipped both files have the correct timestamp again. So it seems 7-zip is just showing a wrong timestamp for some files in the file manager.
There are many things:
1) daylight time changes
2) file sysytem (FAT / NTFS)
3) the program that was used to extract from archive
7-Zip uses UTC timestamp and simplified function that uses corrent timezone offset to show old timestams
New versions of Windows has special code that tries to show correct local time for old timestamps. That function probably "knows" about all time changes in past.
Maybe 7-Zip must use that new function too. But I'm not sure that it's good in 100% cases, since it can change some things that work OK now.
We're noticing the same problem. I have looked in the code, and notice that you use the FileTimeToLocalFileTime API in your PrintTime function. MSDN has the following remarks about this API:
The inverse function (LocalFileTimeToFileTime) has the following remarks:
I've attached a screenshot that shows:
Why New Zealand persists with daylight savings is an annoyance outside the scope of this bug report.
Last edit: Bart Joy 2016-03-09