Account for server & client time difference
|Reported by:||krobertson||Owned by:|
|Keywords:||Cc:||krobertson, Alexander Schuch, Tim Kosse|
|Component version:||Operating system type:|
|Operating system version:|
When target file exists, "Overwrite if source newer" is an excellent option, but its usefulness is degraded by time differences between server & client machines. Consider I'm on in EST and FTP Server is on PST, and I upload a file to Server at 5:00. Server accepts file and timestamps it as 2:00 (its local time). Now if I upload file again, FileZilla Client sees file as newer, always uploading the file even if there were no changes. Worse is if I'm PST and server is EST. I upload file at 2:00, server timestamps it as 5:00. Then if I soon change the file and re-upload my files (2:02) with this option, Client will not see this file as newer so it's not uploaded.
Client should account for local time differences between client and server machines, and it can do so automagically as follows. The first time during a session that this option is used, Client can upload a dummy file to the server, collect its timestamp from the server (getting the server's local time), then delete the file. It saves a "time skew" for the session, which is local time minus server time. Then when comparing dates for the "if newer" option, it adds the time skew to the dates for file on the server, to get the files' timestamps in local time.
In fact, you may even do this at the beginning of any session so that the Remove site files' Last modified dates are shown in local time.