Topic "Windows client, UNIX server time conversions"

Author Message
Matthew
[View user's profile]

Joined: 2010-11-18
Posts: 4
I'm struggling over file modification time issues. I'm using WinSCP 4.2.9 / Windows XP client (with NTFS disk), and talking to a Unix server using SCP.

What I'd like to do is transfer files between client and server so that (1) the UTC file modification times are the same on both and (2) both local and remote panes in WinSCP display modification times in XP style, that is converted to local time based on the client machine current zone and DST settings (current DST, not file modification time DST). Thus the local pane times match Windows explorer, and when client and server are synchronised, file modification times display the same time in both panes.

Unfortunately, I can't see how to set this up, or even that it can be set up. It seems to me that this is the configuration almost all pre Windows 7 client to Unix server users would want.

Please can you help?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
If I understand what you want to do correctly, this should be the default behaviour, if you are connecting to any unix-like server. So what is the actual problem (what does not work as you describe)?
_________________
Martin Prikryl
Matthew
[View user's profile]

Joined: 2010-11-18
Posts: 4
prikryl wrote:
If I understand what you want to do correctly, this should be the default behaviour, if you are connecting to any unix-like server. So what is the actual problem (what does not work as you describe)?


Okay. I have a directory with two files:

  • f7.dat modified 8:00:00 19 July 2010 BST, and
  • f11.dat modified 8:00:00 19 November 2010 GMT

So today Windows explorer and WinSCP left pane give modification times for them as 7:00:00 and 8:00:00 (f7.dat and f11.dat respectively).

I upload them, today, to a Unix server, which happens to have local time UTC-07, so I have set Timezone Offset to 7 hours in the Environment settings. I do this 3 times in three different WinSCP sessions, with results as follows:

  • When connecting with "Adjust remote timestamp to local conventions" the remote pane gives modifications times 7:00:00 and 9:00:00 respectively
  • When connecting with "Adjust remote timestamp with DST" the remote pane gives times 8:00:00 and 10:00:00
  • When connecting with "Preserve remote timestamp" the remote pane gives times 7:00:00 and 9:00:00

Whatever the setting, times in the left and right panes do not match.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Thanks for the details. Can you try the same using SFTP protocol?
_________________
Martin Prikryl
Matthew
[View user's profile]

Joined: 2010-11-18
Posts: 4
prikryl wrote:
Thanks for the details. Can you try the same using SFTP protocol?

With SFTP, after transfer with each of the three settings, the modification times of f7.dat and f11.dat in the remote RH pane match the LH pane / Windows explorer.

For SFTP, I also looked at the modification times reported by ls -l in a shell on the server. These were 23:00:00 & 01:00:00 for "Adjust remote timestamp to local conventions" and "Preserve remote timestamp" and 00:00:00 & 01:00:00 (the correct ones) for "Adjust remote timestamp with DST".
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
So can you do with SFTP?
_________________
Martin Prikryl
Matthew
[View user's profile]

Joined: 2010-11-18
Posts: 4
prikryl wrote:
So can you do with SFTP?

I can, but there seem to be problems with your software that I thought you might like to know about and fix.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Matthew wrote:
I can, but there seem to be problems with your software that I thought you might like to know about and fix.

Sure. But problem with SCP is that the protocol is not standardized, so every server behaves differently. I would have to introduce too many configuration options to cater with the differences and most users won't be able to configure it properly anyway. Generally SCP should be avoided whenever possible, it is inferior to SFTP.
_________________
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