Topic "Wrong modification time in Windows XP with DST"

Author Message
ShmuelG
[View user's profile]

Joined: 2016-07-15
Posts: 6
Location: NY
Hi, I would like to report the following problem.

System & site info:
WinSCP Version 5.8.4 RC (Build 6736)
Windows XP Service Pack 3
WebDAV protocol with TLS/SSL

Problem: The modification times shown in the remote directory are one hour ahead of what they should be. For example, I uploaded a file at 1:45 PM local time, and the log shows it listed as follows:

. 2016-07-19 13:51:22.281 test.doc;-;26624;2016-07-19T17:45:06.000Z;3;"" [0];"" [0];---------;0

I believe this is the correct UTC time (My time zone is GMT -5, but with DST it should become GMT -4.) But WinSCP is showing 2:45:06 PM instead of 1:45:06 PM.
The same file displays correctly when listed in WinSCP on Windows 7.

In the Windows XP Control Panel, I have "Automatically adjust clock for daylight saving changes" turned on, which is the correct setting that most programs need. However, if I turn that setting off, manually change to the GMT -4 time zone, and restart SCP, then the correct time is shown in the file listings.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Please read
https://winscp.net/eng/docs/timestamp#windows
ShmuelG
[View user's profile]

Joined: 2016-07-15
Posts: 6
Location: NY


I've read that, but this is a different issue that WinSCP should be able to handle properly. The documentation at https://winscp.net/eng/docs/ui_login_environment#dst states:

Quote:
Some servers (mostly servers running on the older versions of Windows) incorrectly adjust file timestamp with start of DST. The Daylight saving time option allows you to counterweight the incorrect behavior.

The option is not supported with FTP protocol. The option is also not available with WebDAV protocol, as with it, no issues are known that would require it.


The problem with the WebDAV listing is not that the remote server is reporting the wrong time, because it is reporting the time in UTC, not local time. And Windows Explorer is not shifting the time either, because I am looking at files that were created the same day, so there should be no shifting of daylight saving time at all.

WinSCP is simply translating UTC to local time incorrectly even for a file with today's date.
ShmuelG
[View user's profile]

Joined: 2016-07-15
Posts: 6
Location: NY
Here is some more info. I am attaching screen shots from WinSCP showing the wrong times, and of the same WebDAV site in GoodSync Explorer showing the correct times. Both from the same Windows XP computer.
(Look at listing for files test.txt and test2.txt.)
I am also attaching a log file with "Debug 2" verbosity for the WinSCP session.

I didn't do any transfers in this session, so the XML log doesn't list the files, but it actually has the wrong time for the session start. The time should be 19:15, not 18:15 (I don't know if this has anything to do with the problem in the file listings.)

<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="http://winscp.net/schema/session/1.0" name="XXXXX [I removed the session name from this post]"
start="2016-07-22T18:15:57.937Z">
</session>
ShmuelG WinSCP file listing.png (13.55 KB) Private file

Description: (none)

shmuelgerber@5tjt.com@dav.box.com.log (36.27 KB) Private file

Description: (none)

ShmuelG GoodSync file listing.png (17.9 KB) Private file

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Thanks for the details. But to be honest, I do not think we are going to fix an XP-only problem.
ShmuelG
[View user's profile]

Joined: 2016-07-15
Posts: 6
Location: NY
martin wrote:
Thanks for the details. But to be honest, I do not think we are going to fix an XP-only problem.

It is not only on Windows XP. I tried it on Windows Vista, using the latest version of WinSCP (5.9), and the same problem exists. The file times in the local pane are properly translated into local daylight saving time (matching what is shown in Windows Explorer), but the file times in the remote (WebDAV) pane are shown as being one hour ahead.
Windows Explorer also shows the correct time for the remote file when I use "Map Network Drive" and connect via Windows Vista's built-in WebDAV connector.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
OK, sure. It's XP, Vista, 2003 and 2008 problem (as the link above acknowledges). I've mentioned the XP only because that's the only version out of these that's still used by some.
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