Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
453 views
in .NET FTP by (220 points)

I am using Synchronize setting SyncLocalDateAfterDownload to true. I see in the documentation that it might be required to set the TimeDifference property to have this working properly. However I am making some tests and I am a little confused on how this feature works. I uploaded a file with FileZilla and, as expected the modification time in the FTP server was set to the time I uploaded it (3:14 PM) and using GetLastWriteTime I also see the correct date (Wednesday, October 21, 2015 3:14:44 PM), however when I use Synchronize the downloaded file date is set to 9:14 PM (time in the future).

Why would GetLastWriteTime return the correct date but Synchronize method fail to set the correct date?

My computer is in UTC-6 and as you see the time difference in the local file is +6 hours, not -6. What does Synchronize do to the date returned by the FTP server before setting the local date?

By the way, TimeDifference is set to default (00:00:00)

by (51.6k points)
Are you using SFTP or FTP?  SFTP is nicely standardized on UTC time, but FTP varies.  Usually FTP listings are returned in local time whereas the command that returns the timestamp is returned as a UTC date.  This often causes problems.

Also, is there a time difference between the client and the server?

Please log in or register to answer this question.

Categories

...