Unzip without loosing Timestamp?


#1

Hello

Unzipping files via webftp.dreamhost.com gives them the actual actual date/time instead of the timestamp they had inside the zip.

How can I prevent this?

Thanks!
Bruno


#2

I believe that if you unzip via command line, all timestamps are preserved.

-Scott


#3

Thanks for your fast help!

I tried around with this, but had only partially success: The Files extracted will show the time-difference between our locations: 9h from Switzerland to USA

This way WinSCP does not recognize the content as identical when I unzip the same zip on my PC in Switzerland and on the server in the USA.

What can I do?

Any help appreciated.
Bruno
Edit: I found the reason: http://linux.about.com/od/commands/l/blcmdl1_unzip.htm: “be careful of unzipping in one timezone a zipfile created in another–ZIP archives other than those created by Zip 2.1 or later contain no timezone information”

Tried around with 2.1-compression, gunzip…

… but not the solution… only a hack: increase your local TimeZone to the double before extracting the files locally:

  • USA: -8
  • CH: 1
  • Set to 10, extract, Set to 1

And:
=> Double Check the result! You have to verify that day saving time is not working against you!
=> Start a new WinSCP-Session when working with a changed TimeZone, else WinSCP-TimeCorrection won’t work!