Topic "Copying the same files everyday due to timestamp error"

Author Message
cogdellj
[View user's profile]

Joined: 2015-11-17
Posts: 5
Location: New York
Version is 5.7.6 (build 5874)
Issue happened before upgrade to new version on November 1st.
Windows 2008 R2 standard
FTPS

I have a very simple script that synchronizes my local Inetpub to a remote inetpub. After November first I noticed that my log showed that I was copying the same files everyday. I went into the GUI and it is picking up those same files as changed everyday. The problem appears to be the timestamp on the remote server. The date the remote server is showing is not the same date as the files on the remote server.

For example I go to the remote server I look at one of the pdf files that it is trying to copy, its date is 8/31/2012 12:00 AM on the server. The same file in the gui says 8/30/2012. The image attached shows the file name, date, type and size from the remote server. The bottom of the image shows what the synchronization checklist shows which is incorrect. I have tried everything I found on this site dealing with timestamps nothing is working and its also only a subset of data.
issues.JPG (47.38 KB) Private file

Description: Attached you can see the issue

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Please attach a full log file showing the problem (using the latest version of WinSCP).

Name one of the files with the problem. Explain what timestamp do you see, what timestamp do you expect, and why.

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
cogdellj
[View user's profile]

Joined: 2015-11-17
Posts: 5
Location: New York
I am getting you a session log now however if you look at the image it shows you the files modified date of the remote server is 8/31/2012 12:00 AM and your software to the far right is the remote server is showing the "changed" date as 8/30/2012 basically removing a whole day from the real modified date and not displaying hours or minutes.

Last edited by cogdellj on 2015-11-19 00:01; edited 1 time in total
cogdellj
[View user's profile]

Joined: 2015-11-17
Posts: 5
Location: New York
Attached is the session log all the files in this log are 1 day less than what is showing on the remote server. It started November 1st so maybe it has to do with daylight savings time because the files should show 12:00 am of the next day if you take an hour away and remove the hours it puts them 1 day before, however it is not happening to all files in the folder just some.
session.log (86.6 KB) [Download]

Description: session log

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Thanks for the log. I'd like to see the remote directory listing listing after the synchronization.

Can you repeat the test and enter the filesnotfound folder after the synchronization?
cogdellj
[View user's profile]

Joined: 2015-11-17
Posts: 5
Location: New York
Log attached.
session.log (410.67 KB) Private file

Description: Session file

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Thanks.

So what happens is:
- The local file has timestamp 2013-08-19 04:00:00 GMT
- The remote file has timestamp 2013-08-18 server time. The server does not provide time, just date.
- WinSCP considers the remote file old and uploads the local file.
- After the upload WinSCP asks the server to set the remote timestamp to 2013-08-19 04:00:00 GMT
- The server probably converts the GMT time to local time (as of the server) just before midnight the previous day (2013-08-18)
- So you end up where you started.

This all stems from from ancient directory listing used by the server that
1) does not provide time for old files
2) uses server's time instead of GMT.
cogdellj
[View user's profile]

Joined: 2015-11-17
Posts: 5
Location: New York
It is not clear how can I resolve this? should I drop the files from the remote side then synch again?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
I do not have a solution.

Use a better FTP server. Or use WebDAV protocol to talk to the IIS.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License