martin wrote:
This still apears to be a problem in the latest version of WinSCP.
Is there any further info that I could supply which would be helpful to you?
Sorry, I haven't time to try to investigate the problem before the last release. It's still on the TODO list though.
I've done some further tests myself and also read some of the WinSCP source code. In particular the routines UnixToDateTime, DateTimeToFileTime and ConvertTimestampToUnix. For example in the UnixToDateTime routine I can see it subtracts Params->CurrentDifference (which may include the DaylightDifference) but then goes on (if ConsiderDST is set) to maybe subtract the DaylightDifference again. I think this is what is causing my problem.
I have now come to the conclusion that I should configure WinSCP with "Server Adjusts DST" even though my server is unix. This then looks as though it will solve my problem (both now and after the imminent DST change). However this would then mean I would have this option configured in the opposite way to what the documentation indicates is needed for a unix server:
Some servers (mostly on Windows) adjust file timestamp with start of DST and some not (Unix). The option selects between the two approaches
It looks as though (with SFTP) the code is implementing this option back to front.