Mat41
Mat41

Reputation: 1267

WinSCP is showing file modification time in wrong time zone

We are using WinSCP 5.1.1. When we FTP to host, WinSCP is showing file modification times incorrectly. It appears to always be 10 hours out. Since we are in Sydney I assume we are getting UTC time. How can I ensure we get actual remote host last modified? I have read about MFMT and contacted host to ask if server supports this. Their response was:

Server supports MDTM which is similar functionality.
The following commands are recognized:
ABOR ACCT ALLO APPE CDUP CWD DELE EPRT EPSV FEAT HELP LIST MDTM MKD MODE NLST NOOP OPTS PASS PASV PORT PWD QUIT REIN REST RETR RMD RNFR RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD

Should this be enough?? Under the Environment properties in WinSCP I notice Preserve remote timestamp is not an active option since I am using FTP. I found another post suggesting a transfer preset could be a good idea. I have also done this and told it to preserver timestamp under the common options. I know its kicking in because it prompts me when I fire the session.

In summary my Issue/Questions is - If using WinSCP 5.1.1, during a FTP session to a server that claims to support MDTM should the last modification date show the value on the server or should it show UTC time? Based on what I have already done is there anything on my end that I can do to get the last modification date value on the server?

Upvotes: 3

Views: 10580

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202360

From your log, you posted on the WinSCP support forum:

. 2014-05-22 15:42:34.140 WinSCP Version 5.1.1 (Build 2735) (OS 5.2.3790 Service Pack 2)
...
< 2014-05-22 15:42:34.531 220 McAfee Web Gateway 7.2.0 build 14593
. 2014-05-22 15:42:34.578 Trying to access ftp.theweather.com.au through ftp proxy...
...
> 2014-05-22 15:42:34.937 FEAT
< 2014-05-22 15:42:34.968 211-Features:
< 2014-05-22 15:42:34.968   EPRT
< 2014-05-22 15:42:34.984   EPSV
< 2014-05-22 15:42:35.000   PASV
< 2014-05-22 15:42:35.000   SIZE
< 2014-05-22 15:42:35.000   MDTM
< 2014-05-22 15:42:35.000 211 End

The version of WinSCP you are using does not support a timezone detection for antiquated servers. Your FTP server does not support a modern MLSD command, what is not common nowadays. The MLSD mandates that times are in UTC, so WinSCP would automatically convert them. With an obsolete LIST command, older versions of WinSCP keep times intact.

Upvotes: 2

Related Questions