Page 1 of 1

files displayed in FTP panel doesn't respect UTC offset

Posted: 2019-05-07, 11:03 UTC
by krapet
Persisting issue of displayed file time on FTP. (I have set "SpecialFlags=4096" in wcx_ftp.ini)

Works fine when Synchronize Dirs... (dT=2h, mdtm and utc checked)
Both file are set to have same time: local file 1.5.2019 12:34:56, FTP file in UTC 1.5.2019 10:34:56.
Before sync:
local_file.txt - FTP: NO file, HDD: 12:34:56
server_file.txt - FTP: 12:34:00, HDD: NO file
Screenshot: ERR_TotalCommander_FTP_1.png
After sync (NOTE: local file time is modified too):
local_file.txt - FTP: 12:34:00, HDD: 12:34:00
server_file.txt - FTP: 12:34:00, HDD: 12:34:00
Screenshot: ERR_TotalCommander_FTP_2.png
After sync in panel view:
local_file.txt - FTP: 10:34, HDD: 12:34
server_file.txt - FTP: 10:34, HDD: 12:34
Screenshot: ERR_TotalCommander_FTP_3.png
NOTE: FTP files are shown in UTC and local files in local time.


Classic panel view
Both file are set again to have same time.
Before copy:
local_file.txt - FTP: NO file, HDD: 12:34
server_file.txt - FTP: 10:34, HDD: NO file
Screenshot: ERR_TotalCommander_FTP_4.png
After copy (local to FTP and FTP to local):
local_file.txt - FTP: 10:34, HDD: 12:34
server_file.txt - FTP: 10:34, HDD: 10:34
Screenshot: ERR_TotalCommander_FTP_5.png

I observed that there is an offset 1 hour in the winter time and by 2 hours in the summer time.

It looks that panel view of FTP files doesn't respect UTC offset.

Why the time synchronization option on FTP is not accessible through menu and is available only by modifiing wcx_ftp.ini file?
Total Commander is presented as file manager isn't it?

All screenshots.

Re: files displayed in FTP panel doesn't respect UTC offset

Posted: 2019-05-07, 11:57 UTC
by petermad
I have no such problems. Maybe you should check your MLSD setting for that server in TC's FTP dialog -> "Advanced" -> "Use MLSD for directory listings". Notice this setting has 3 states. If your server doesn't support MLSD, it is difficult to get the time right when uploading.

Re: files displayed in FTP panel doesn't respect UTC offset

Posted: 2019-05-09, 10:25 UTC
by ghisler(Author)
Indeed file times only use UTC when using MLSD for file listings. When using LIST, the server sends the time in local time, so TC cannot correct it. There is an edit box in the sync tool where you could enter a server time offset, but it cannot handle daylight saving times.

Re: files displayed in FTP panel doesn't respect UTC offset

Posted: 2019-05-13, 14:33 UTC
by krapet
I tried 3 different servers and I have seen 3 different behavior.

If TC will know whether read time is in UTC then it could be able to convert every time into the time of actual system time zone. It also should be able to determine if apply daylight-saving shift or not.

For users may be useful selection for every ftp connection to use UTC, local or define time shift manually.

Re: files displayed in FTP panel doesn't respect UTC offset

Posted: 2019-12-13, 11:02 UTC
by krapet
Hi Thomas,
In most cases I don't need syncronize whole directory or even whole site.
The correct files timestamps shown in panel are very important for me.

I have a suggestion how to solve it smartly (when is not possible detect server time offset).
1) TC knows my offset to UTC.
2) In most cases, the ftp server can be expected to use UTC time.
So it should be easy to modify all received file timestamps from UTC to local and display them in the panel as local times.

Advanced solution may be to add some configuration into ftp connection menu.
Eg. check-box: Display in UTC or field: FTP time offset as it is in tool "Synchronization directories".

Re: files displayed in FTP panel doesn't respect UTC offset

Posted: 2019-12-16, 11:31 UTC
by ghisler(Author)
Unfortunately the LIST command uses local time, not UTC time. This is the case for both of my servers, ghisler.com (USA) and ghisler.ch (Germany). Only MLSD is using UTC.