Issue preserving Last Modified on download on specific server

Advertisement

Keev
Joined:
Posts:
3
Location:
Denmark

Issue preserving Last Modified on download on specific server

Hi,

I am struggling with a wrong Last Modified timestamp when downloading from one specific server using the command line version of WinSCP. Regardless of which file I download, the date in Windows is set to 1899/12/30 0:00:00 (and shown as blank in the file explorer - see image). This only happens when downloading from one specific server and only when using the command line version or the .NET assembly. I actually noticed this when using the .GetFiles() method in the .NET assembly and then switched to WinSCP.com to see if the problem was the same - which it is. However, if using the UI, the timestamp is preserved correctly.



The command I trigger is:
get -preservetime -transfer="automatic" -- "/welcome.msg" "C:\Users\khn\Desktop\ntest\welcome.msg"

The log shows:
. 2015-09-11 09:19:51.020 --------------------------------------------------------------------------
. 2015-09-11 09:19:51.020 WinSCP Version 5.7.5 (Build 5665) (OS 6.1.7601 Service Pack 1 - Windows 7 Enterprise)
. 2015-09-11 09:19:51.021 Configuration: C:\Users\khn\Downloads\winscp575\WinSCP.ini
. 2015-09-11 09:19:51.021 Log level: Normal
. 2015-09-11 09:19:51.021 Local account: NTATP\KHN
. 2015-09-11 09:19:51.021 Working directory: C:\Users\khn\Downloads\winscp575
. 2015-09-11 09:19:51.021 Process ID: 7196
. 2015-09-11 09:19:51.021 Command-line: "C:\Users\khn\Downloads\winscp575\WinSCP.exe" /console=575 /consoleinstance=_5384_805 "/log=test3.txt" 
. 2015-09-11 09:19:51.021 Time zone: Current: GMT+2, Standard: GMT+1 (Rom, normaltid), DST: GMT+2 (Rom, sommertid), DST Start: 29-03-2015, DST End: 25-10-2015
. 2015-09-11 09:19:51.022 Login time: 11. september 2015 09:19:51
. 2015-09-11 09:19:51.022 --------------------------------------------------------------------------
. 2015-09-11 09:19:51.022 Script: Retrospectively logging previous script records:
> 2015-09-11 09:19:51.022 Script: open ftp://[removed]@ftp.nomura.com
. 2015-09-11 09:19:51.022 --------------------------------------------------------------------------
. 2015-09-11 09:19:51.022 Session name: [removed]@ftp.nomura.com (Ad-Hoc site)
. 2015-09-11 09:19:51.022 Host name: ftp.nomura.com (Port: 21)
. 2015-09-11 09:19:51.022 User name: [removed] (Password: No, Key file: No)
. 2015-09-11 09:19:51.022 Transfer Protocol: FTP
. 2015-09-11 09:19:51.022 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2015-09-11 09:19:51.022 Disable Nagle: No
. 2015-09-11 09:19:51.022 Proxy: none
. 2015-09-11 09:19:51.022 Send buffer: 262144
. 2015-09-11 09:19:51.022 UTF: 2
. 2015-09-11 09:19:51.022 FTP: FTPS: None; Passive: Yes [Force IP: A]; MLSD: A [List all: A]
. 2015-09-11 09:19:51.022 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-09-11 09:19:51.022 Cache directory changes: Yes, Permanent: Yes
. 2015-09-11 09:19:51.022 Timezone offset: 0h 0m
. 2015-09-11 09:19:51.022 --------------------------------------------------------------------------
. 2015-09-11 09:19:51.028 Connecting to ftp.nomura.com ...
. 2015-09-11 09:19:51.074 Connected with ftp.nomura.com. Waiting for welcome message...
< 2015-09-11 09:19:51.138 220-Connected to ftp.nomura.com.
< 2015-09-11 09:19:51.138 220-
< 2015-09-11 09:19:51.139 220-     Data, information and programs held on this system are private property,
< 2015-09-11 09:19:51.140 220-     confidential to the owner of this system, and may be accessed only by
< 2015-09-11 09:19:51.140 220-     authorised users and for authorised purposes.
< 2015-09-11 09:19:51.140 220-
< 2015-09-11 09:19:51.140 220-     Unauthorised access to this system constitutes a criminal offence, for which
< 2015-09-11 09:19:51.140 220-     you may be liable to a fine and/or imprisonment, and to civil damages.
< 2015-09-11 09:19:51.140 220-
< 2015-09-11 09:19:51.140 220-     If you are not an authorised user accessing the system for an authorised
< 2015-09-11 09:19:51.141 220-     purpose disconnect immediately.
< 2015-09-11 09:19:51.141 220-
< 2015-09-11 09:19:51.141 220-Nomura International Plc Internet FTP server
< 2015-09-11 09:19:51.141 220-
< 2015-09-11 09:19:51.141 220 FTP server ready.
> 2015-09-11 09:19:51.141 USER [removed]
< 2015-09-11 09:19:51.195 331 Password required for [removed]
> 2015-09-11 09:19:55.107 PASS ********
< 2015-09-11 09:19:55.190 230-Nomura International Plc Internet FTP server
< 2015-09-11 09:19:55.190 230-
< 2015-09-11 09:19:55.190 230-For Authorized Users and Legitimate Purposes Only!
< 2015-09-11 09:19:55.190 230 User [removed] logged in.  Access restrictions apply.
> 2015-09-11 09:19:55.191 SYST
< 2015-09-11 09:19:55.236 215 UNIX Type: L8
> 2015-09-11 09:19:55.236 FEAT
< 2015-09-11 09:19:55.278 211-Features:
< 2015-09-11 09:19:55.278  MDTM
< 2015-09-11 09:19:55.278  MFMT
< 2015-09-11 09:19:55.278  TVFS
< 2015-09-11 09:19:55.278  MFF modify;UNIX.group;UNIX.mode;
< 2015-09-11 09:19:55.279  MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
< 2015-09-11 09:19:55.279  REST STREAM
< 2015-09-11 09:19:55.279  SIZE
< 2015-09-11 09:19:55.279 211 End
. 2015-09-11 09:19:55.279 Connected
. 2015-09-11 09:19:55.280 --------------------------------------------------------------------------
. 2015-09-11 09:19:55.280 Using FTP protocol.
. 2015-09-11 09:19:55.282 Doing startup conversation with host.
> 2015-09-11 09:19:55.283 PWD
< 2015-09-11 09:19:55.325 257 "/" is the current directory
. 2015-09-11 09:19:55.325 Getting current directory name.
. 2015-09-11 09:19:55.325 Startup conversation with host finished.
< 2015-09-11 09:19:55.325 Script: Active session: [1] [removed]@ftp.nomura.com
> 2015-09-11 09:20:01.532 Script:  get -preservetime -transfer="automatic" -- "/welcome.msg" "C:\Users\khn\Desktop\ntest\welcome.msg"
. 2015-09-11 09:20:01.532 Listing file "/welcome.msg".
. 2015-09-11 09:20:01.532 Retrieving file information...
> 2015-09-11 09:20:01.532 MLST /welcome.msg
< 2015-09-11 09:20:01.576 250-Start of list for /welcome.msg
< 2015-09-11 09:20:01.577 250-modify=20100806131358;perm=adfr;size=97;type=file;unique=47C7919U177CF;UNIX.group=669;UNIX.mode=0444;UNIX.owner=20792; /welcome.msg
< 2015-09-11 09:20:01.577 250 End of list
. 2015-09-11 09:20:01.577 250-modify=20100806131358;perm=adfr;size=97;type=file;unique=47C7919U177CF;UNIX.group=669;UNIX.mode=0444;UNIX.owner=20792; /welcome.msg
. 2015-09-11 09:20:01.577 Retrieving file information successful
. 2015-09-11 09:20:01.577 welcome.msg;-;97;1899-12-30T01:00:00.000Z;"20792" [0];"669" [0];r--r--r--;0
. 2015-09-11 09:20:01.578 Copying 1 files/directories to local directory "C:\Users\khn\Desktop\ntest\"
. 2015-09-11 09:20:01.578   PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask: welcome.msg
. 2015-09-11 09:20:01.578   TM: M; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0
. 2015-09-11 09:20:01.578   AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2015-09-11 09:20:01.578 File: '/welcome.msg' [n/a] [97]
. 2015-09-11 09:20:01.579 Copying "/welcome.msg" to local directory started.
. 2015-09-11 09:20:01.579 Binary transfer mode selected.
. 2015-09-11 09:20:01.579 Starting download of /welcome.msg
> 2015-09-11 09:20:01.580 TYPE A
< 2015-09-11 09:20:01.621 200 Type set to A
> 2015-09-11 09:20:01.621 PASV
< 2015-09-11 09:20:01.664 227 Entering Passive Mode (147,62,2,1,179,49)
> 2015-09-11 09:20:01.664 MLSD
< 2015-09-11 09:20:01.749 150 Opening ASCII mode data connection for MLSD
. 2015-09-11 09:20:01.750 modify=20150904113925;perm=flcdmpe;type=cdir;unique=47C7919U177CE;UNIX.group=669;UNIX.mode=0700;UNIX.owner=20792; .
. 2015-09-11 09:20:01.751 modify=20150904113925;perm=flcdmpe;type=pdir;unique=47C7919U177CE;UNIX.group=669;UNIX.mode=0700;UNIX.owner=20792; ..
. 2015-09-11 09:20:01.751 modify=20100806131358;perm=adfr;size=97;type=file;unique=47C7919U177CF;UNIX.group=669;UNIX.mode=0444;UNIX.owner=20792; welcome.msg
. 2015-09-11 09:20:01.751 modify=20150910035154;perm=adfrw;size=386526;type=file;unique=47C7919UC7043;UNIX.group=669;UNIX.mode=0644;UNIX.owner=20792; EMMom_Weights_INDIGO.csv
< 2015-09-11 09:20:01.791 226 Transfer complete
> 2015-09-11 09:20:01.791 TYPE I
< 2015-09-11 09:20:01.832 200 Type set to I
> 2015-09-11 09:20:01.832 PASV
< 2015-09-11 09:20:01.874 227 Entering Passive Mode (147,62,2,1,52,1)
> 2015-09-11 09:20:01.876 RETR welcome.msg
< 2015-09-11 09:20:01.960 150 Opening BINARY mode data connection for welcome.msg (97 bytes)
< 2015-09-11 09:20:02.000 226 Transfer complete
. 2015-09-11 09:20:02.000 Download successful
. 2015-09-11 09:20:02.000 Transfer done: '/welcome.msg' [97]

I noticed that it shows the 1899 timestamp at log entry 09:20:01.577. I also confirmed that if performing a "list" command the returned timestamp is correct, but using "stat" it is wrong.

Any idea about how to work around this?

Interface is Commandline / .NET Assembly
Protocol is FTP.
I'm running WinSCP 5.75 on Windows 7 SP1.[/img]

WrongTimestamp.jpg

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum