Topic "SCP remote timezone adjustment seems incorrect"

Author Message
pjc42
[View user's profile]

Joined: 2017-11-13
Posts: 2
Location: user
I connot get winscp to synchronize correctly because of timestamp issues. From my reading of the sync log, it appears winscp is applying an incorrect timezone adjustment to the remote. The remote is on UTC already and so should not require an adjustment. Winscp is incorrectly applying an 8 hour (which is the local machine's PST) adjustment.

Is this a bug or am I missing a setting somewhere?

Many thanks for your attention.

Example:

I have a simple test case with a single file (see attached log for sync info).
local: -rw-r--r-- 1 pjc 197121 32 Nov 12 15:14 file51
remote: -rw-r--r-- 1 pjc pjc 90 Nov 12 23:00 file51

The local file51 has a timestamp 23:15 UTC vs 23:00 UTC on the remote so should be copied from local to remote.
However, it is not. WinScp instead adjusts the timestamp on the remote as:
. 2017-11-12 16:11:08.996 file51;-;90;2017-11-13T07:00:18.000Z;3;"pjc" [0];"pjc" [0];rw-r--r--;0
which is the actual timestamp +8, and thus concludes that the remote is ahead of the local and thus the local should not be copied.


Notes:
- Using WinSCP 5.11.2 (build 7781) on Windows 10 x64, gui, commander
- the connection is scp
- local machine with winscp, is on PST and winscp correctly adjusts the timestamp to UTC
- remote machine is ubuntu 16.04, is UTC time already so should not be adjusted but is actually getting the same PST adjustment as the local
Local time: Sun 2017-11-12 23:32:37 UTC
Universal time: Sun 2017-11-12 23:32:37 UTC
RTC time: Sun 2017-11-12 23:32:37
Time zone: Etc/UTC (UTC, +0000)


Session log file is attached.
winscp-tdir-pjc@35.185.197.122.log (1.7 KB) [Download]

Description: log file for testcase file51 sync from local to remote illustrates incorrect timezone adjsutement on server

martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
With SCP protocol, WinSCP indeed assumes that the server is in the same time zone as the client.
You can configure a timezone different in session settings.

Or even better, use SFTP, instead of SCP. With SFTP, you should not have these problems at all.

See https://winscp.net/eng/docs/ui_login_environment#timezone
pjc42
[View user's profile]

Joined: 2017-11-13
Posts: 2
Location: user
Martin, my bad. Makes perfect sense. Thanks for the quick reply.

--Peter

martin wrote:
With SCP protocol, WinSCP indeed assumes that the server is in the same time zone as the client.
You can configure a timezone different in session settings.

Or even better, use SFTP, instead of SCP. With SFTP, you should not have these problems at all.

See https://winscp.net/eng/docs/ui_login_environment#timezone
Advertisements

You can post new topics in this forum

Search

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