Topic "Sync: REMOTE timestamp diff between SCP and SFTP"

Author Message
Ron
[View user's profile]

Joined: 2007-05-06
Posts: 9
Location: Boston, MA USA
Hi,
I just d/l the newest version of standalone WinSCP and came across what seems to be a bug. I left the default SFTP in place (by accident) and wound up with a few thousand differences during synchronization (I have a very large filesystem that I sync). The differences were older files with timestamps all off by exactly 1 hour.

I suspected a few possibilities: a DST issue, a WinSCP version issue or a computer migration issue (as this was my first WinSCP run on a new local PC). To begin investigating, I tried re-running the sync on a small directory on my old system and there were no diffs. I checked the FAQs about timestamps.

Then I realized I was running under SFTP on the new system and SCP on the old. I changed the new system to login under SCP and re-ran the sync and there were no diffs.

So there is no migration issue, and there doesn't appear to be a DST issue under SCP. It appears that there is a difference in the way someone (SFTP, SCP, Windows or WinSCP) is handling timestamps between SCP and SFTP.

My new PC is running Windows 7 and WinSCP v. 4.2.7 (Build 758).

I confirmed this behaviour on the old PC which is running Windows XP (32 bit) and WinSCP v. 4.1.8 (Build 415).

I checked some timestamps- when running WinSCP under SFTP, the local timestamp in the sync checklist agrees with the timestamp when I look at the local file using windows explorer. The remote timestamp is advanced by 1 hour.

Under Linux, the timestamp for the file (ls --full-time) shows
2004-03-23 02:38:10.000000000
Under windows the time shows as
3/23/2004 3:38:10 AM
In the sync list local: (SFTP)
3/23/2004 3:38:10 AM
In the sync list remote: (SFTP)
3/23/2004 4:38:10 AM
(under SCP WinSCP sync shows no differences)

Logging in and visually inspecting the remote timestamp for the same file:
SFTP:
3/23/2004 4:38:10 AM
SCP:
3/23/2004 3:38:10 AM

Good Luck,
-Ron
Advertisements
Guest




*gentle bump to the top* Wink
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
I'm working on this. Timestamp handling has changed in Windows 7. I'll post updates once I have some.
_________________
Martin Prikryl
Guest




Hi Martin,

I'm not sure this is just a Windows 7 issue-- I also confirmed the same behavior running under XP and an older version of WinSCP.

Quote:
I confirmed this behaviour on the old PC which is running Windows XP (32 bit) and WinSCP v. 4.1.8 (Build 415).
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
OK, reading your message carefully again...
SCP protocol is not reliable regarding timestamps. It is hardly possible to make it work consistently with SFTP (which hopefully is reliable as it is implemented in WinSCP). More over Windows 7 changed a way timestamps are shifted when DST in turned on or off. The latest released version of WinSCP does not account for that yet. The next one will. So either stick with SCP for now. Or if you want to switch to SFTP, do, but perform timestamp synchronization.
_________________
Martin Prikryl
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