Preserve datestamp on extracted files/folders

Talk about Keka
Forum rules
Talk about Keka here. For bugs go to Issues.
Post Reply
menthol
I know Keka
I know Keka
Posts: 1
Joined: Thu Apr 04, 2013 1:09 pm

Preserve datestamp on extracted files/folders

Post by menthol » Thu Apr 04, 2013 1:11 pm

I might be doing something wrong but keka is not preserving the datestamps of my files after extracting. Could someone else confirm this too?
Lotusbrod
Translator
Translator
Posts: 12
Joined: Fri Feb 22, 2013 3:37 am

Re: Preserve datestamp on extracted files/folders

Post by Lotusbrod » Thu Apr 04, 2013 11:52 pm

I've not noticed so I just did a quick check with a .zip file using Keka 1.0.4b3 on Snow Leopard and the extracted file had the original creation date but ...

Code: Select all

ls -Ul
shows that the creation date has not changed

Code: Select all

ls -tl
(the default for ls) shows the modified time is the time of extraction

I've deliberately said "date" for the the creation date because something odd seems to be going on there. I've extracted the contents of a zip file sent to me last month which I've extracted before. Extracting it again and comparing the file properties the creation date hasn't changed but the time on that date has. I've never seen that before and wouldn't have noticed this time if they were not side by side. Whether Keka has anything to do with this I don't know

EDIT:
I have discovered why the times are different. It seems that the first time I extracted the file I was not using Keka :oops: Although Keka is set as the default, for some reason I opened it with OS X's Archive Utility. I've just done that again to confirm. It looks as if Keka ignores timezone. The file was created in a UTC+1 timezone (Germany before daylight saving started) at 15:44 (an assumption which matches other information as I know it was created during office hours) so Archive Utility extracts it with a file creation time of 22:44 which is the correct time in Japan (UTC+9) for when the file was created. Keka makes the time 14:44 which was what it was in UTC but clearly that is wrong on my system as it makes it look as if the file was created 9 hours earlier than it was.

There are 2 different problems here:
1. The timezone problem I have just described is a defect. Whether it is a defect in Keka or p7zip I don't know. If I have time I will test that later.
2. The fact that mtime is set to the time of the extraction. This is not a defect in my opinion. There are arguments for and against doing this but of course users may have specific reasons why they want it to be handled in a particular way. It might be nice to have an option to choose which method in the preferences: let the system set the mtime as it would for any file newly saved onto the local filesystem or force it to change the mtime to match the mtime of the file in the archive (assuming that information is stored as I understand there are times when it is not).

EDIT (again):
I've downloaded p7zip independently and tested the same archive with that. It seems the timezone problem is a p7zip defect.
User avatar
aone
Mr. Keka
Mr. Keka
Posts: 271
Joined: Sun Feb 26, 2012 8:42 pm
Contact:

Re: Preserve datestamp on extracted files/folders

Post by aone » Fri Apr 05, 2013 8:20 am

Perfect as always Lotusbrod. In fact it is a p7zip consecuence. I'm going to see if I can fix it.
aone ~
Post Reply