Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

No be honest, I do not know.
NottaSmartMan

What's confusing me is that I'm able to set/read remote dates as early as 1901. So, I'm able to get beyond 1970.

My logs show "SFTP version 6 negotiated."

Does WinSCP itself support setting/reading such old remote dates (year 1601)? My logs don't show the date read or attempted to be set on either side.
martin

Re: Problem if LastWrite date is older than 12/14/1901

The most common SFTP version 3 uses 32-bit unsigned Unix timestamps. So it does not support dates before 1970. The newer versions of the protocol support 64-bit signed timestamps, so virtually unlimited date range.
NottaSmartMan

Problem if LastWrite date is older than 12/14/1901

I'm having an odd problem and am finding it difficult to determine if the issue is WinSCP, the servers I'm connecting to, or perhaps the SFTP standard itself.

I have several thousand files I need to replicate where the LastWrite timestamp is 1/1/1601 (oldest possible NTFS timestamp).

I've tried various clients (WinSCP, FileZilla, Native Windows) and servers (Cerberus, Bitvise, Rebex tiny sFTP), and haven't found any combination that will allow for old remote timestamps to set and display properly.

This issue is causing thousands of files to re-sync (via $session.SynchronizeDirectories) whenever our script is re-ran because WinSCP interprets a 1/1/1601 timestamp as 4/22/2009.

For a sanity check, to your knowledge, does the SFTP protocol permit setting and listing dates older than 1901 in the spec? If so, should WinSCP be able to set and understand such an old date if the server is sending such a timestamp properly in a directory listing?

Attached is a screenshot to hopefully better illustrate my point... you'll see that the files with timestamps pre 12/14/1901 locally differ wildly from their remote counterpart.