Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

7zip changes file time

Aug
1,914
68
I have a file;
Code:
c:\users\jlc\utils>dir "ScrapBook 18 Jan 2018.fpr"

 Volume in drive C is WINDOWS      Serial number is d4d0:ce4e
 Directory of  C:\Users\jlc\utils\ScrapBook 18 Jan 2018.fpr

 1/18/2018  11:50         747,466  ScrapBook 18 Jan 2018.fpr
             747,466 bytes in 1 file and 0 dirs    749,568 bytes allocated
     655,238,807,552 bytes free

..on which I use 7ZIP;
Code:
c:\users\jlc\utils>7ZIP /P Scrapbook "ScrapBook 18 Jan 2018.fpr"
<= C:\Users\jlc\utils\ScrapBook 18 Jan 2018.fpr
  100 %

...when I take a look inside the .7z, it has a different file time;
Code:
c:\users\jlc\utils>7zip /v Scrapbook.7z
2018-01-18  06:50        747,466 ScrapBook 18 Jan 2018.fpr

...than the time the file was created;
Code:
c:\users\jlc\utils>dir Scrapbook.7z

 Volume in drive C is WINDOWS      Serial number is d4d0:ce4e
 Directory of  C:\Users\jlc\utils\Scrapbook.7z

 1/18/2018  11:52         746,533  Scrapbook.7z
             746,533 bytes in 1 file and 0 dirs    749,568 bytes allocated
     655,238,115,328 bytes free

7zip is an internal command;
Code:
c:\users\jlc\utils>which 7zip
7zip is an internal command

c:\users\jlc\utils>ver

TCC  22.00.33 x64   Windows 7 [Version 6.1.7601]

When I delete the original file;
Code:
c:\users\jlc\utils>del "ScrapBook 18 Jan 2018.fpr"
Deleting C:\Users\jlc\utils\ScrapBook 18 Jan 2018.fpr
     1 file deleted              749,568 bytes freed

...unzip the .7z file;
Code:
c:\users\jlc\utils>7unzip Scrapbook.7z
=> C:\Users\jlc\utils\ScrapBook 18 Jan 2018.fpr

...it is back to the correct time.
Code:
c:\users\jlc\utils>dir "ScrapBook 18 Jan 2018.fpr"

 Volume in drive C is WINDOWS      Serial number is d4d0:ce4e
 Directory of  C:\Users\jlc\utils\ScrapBook 18 Jan 2018.fpr

 1/18/2018  11:50         747,466  ScrapBook 18 Jan 2018.fpr
             747,466 bytes in 1 file and 0 dirs    749,568 bytes allocated
     655,237,509,120 bytes free

Why is this?

Joe
 
UTC vs local time?
It seems that difference is wrongly applied.
Code:
v:\> filetimes testfile
Created:  2018-01-19 13:00:00
Accessed: 2018-01-19 12:00:00
Modified: 2018-01-19 14:00:00   <=========== local

v:\> filetimes testfile /u
Created:  2018-01-19 18:00:00
Accessed: 2018-01-19 17:00:00
Modified: 2018-01-19 19:00:00  <=========== UTC

v:\> 7zip /p testfile testfile
<= V:\testfile
  0 %

v:\> 7zip /v testfile.7z
2018-01-19  09:00              0 testfile  <======== ???

v:\> del testfile
Deleting V:\testfile
     1 file deleted

v:\> 7unzip testfile.7z
=> V:\testfile

v:\> filetimes testfile
Created:  2018-01-19 14:00:00
Accessed: 2018-01-19 14:00:00
Modified: 2018-01-19 14:00:00   <=========== local

v:\> filetimes testfile /u
Created:  2018-01-19 19:00:00
Accessed: 2018-01-19 19:00:00
Modified: 2018-01-19 19:00:00  <=========== UTC
 
7za.exe gives local times.
Code:
v:\> u:\7za.exe l testfile.7z
   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2018-01-19 14:00:00 ....A            0            0  testfile
------------------- ----- ------------ ------------  ------------------------
 
After doing a bit of reading at the 7-Zip forum, it would seem that this is a WAD issue.

1516486657960.png


Joe
 

Similar threads

Back
Top