files displayed in FTP panel doesn't respect UTC offset

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
krapet
Junior Member
Junior Member
Posts: 21
Joined: 2007-08-02, 06:39 UTC
Location: Czech

files displayed in FTP panel doesn't respect UTC offset

Post 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.
Last edited by krapet on 2019-10-16, 16:46 UTC, edited 1 time in total.
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post 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.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post 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.
Author of Total Commander
https://www.ghisler.com
krapet
Junior Member
Junior Member
Posts: 21
Joined: 2007-08-02, 06:39 UTC
Location: Czech

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

Post 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.
krapet
Junior Member
Junior Member
Posts: 21
Joined: 2007-08-02, 06:39 UTC
Location: Czech

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

Post 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".
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post 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.
Author of Total Commander
https://www.ghisler.com
Post Reply