Sync: REMOTE timestamp diff between SCP and SFTP
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
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