Problem:
When using CuteFTP (Home and Professional) to connect to Serv-u, the "Conserve Local File Time" feature doesn't work properly.
Cause:
The MDTM command is supposed to be used for retrieving a file's time from the server. However, CuteFTP and various other FTP clients use the MDTM command change (set) an uploaded file's timestamp as well.
The official draft documenting the MDTM command (draft-ietf-ftpext-mlst-16.txt) makes no provisions for using the MDTM command to set the file time stamp, so various clients and servers have ended up implementing the command differently.
The typical command syntax is MDTM YYYYMMDDHHMMSS FILENAME, where the HHMMSS is either the client's actual local time zone, or in the case of some FTP clients, GMT (Greenwich Meridian Time), which mimics the retrieve behavior of MDTM as documented in section 2.3 of the afore mentioned IETF draft.
A couple servers, such as Serv-u, have extended the MDTM command even further, adding a time zone parameter to the end of the MDTM command, as follows: MDTM YYYYMMDDHHMMSS[+-TZ] FILENAME.
CuteFTP does not support this proprietary [+-TZ] parameter. Also, CuteFTP sends the local time for the HHMMSS portion of the MDTM command sequence, not the GMT time. Unfortunately, Serv-u (and potentially a couple other FTP servers) expect the time to be sent in GMT, and automatically adjust the time for the file, causing it to be different than what the client expected.
Here is an example:
CuteFTP retrieves a listing. File time shows 8:55 AM
-rw-rw-rw- 1 user group 20249 May 14 08:55 Reports.cfc
CuteFTP now does an MDTM retrieve time to determine what the remote file's time is.
Notice the server sends 12:55 PM, adding 4 hrs. due to the server's time difference and GMT.
COMMAND:> MDTM Reports.cfc
213 20040514125501
Next CuteFTP uploads the replacement Reports.cfc file
STOR Reports.cfc
Then CuteFTP issues an MDTM command to set the time according the actual date and LOCAL time of the file, which happens to be 12:55 PM
COMMAND:> MDTM 20040514125501 Reports.cfc
Subsequently we retrieve the list from the server. Notice the time, 8:55 AM!
-rw-rw-rw- 1 user group 20249 May 14 08:55 Reports.cfc
Therefore the server didn't write the 12:55 timestamp as requested, instead, it assumed the timestamp was in GMT and subtracted 4 hours.
Workaround:
No known workarounds.
Solution:
Don't turn on this feature when connecting to Serv-U or other FTP servers that modify the time sent as part of the MDTM set sequence.
In the future, GlobalSCAPE will make provisions for submitting times in either local or GMT times or add support for the [+-TZ] parameter.