When copying via FTP, the date is set to "today"

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Stefan2, white, sheep, Hacker

Post Reply
Bebosher
Junior Member
Junior Member
Posts: 7
Joined: 2017-03-01, 12:27 UTC

When copying via FTP, the date is set to "today"

Post by *Bebosher » 2017-11-21, 20:49 UTC

Hi everyone,

when copying via FTP, all files get the current date. That should be able to switch off as synonymous with copying via F5.
A Bug?

Micha

User avatar
Hacker
Moderator
Moderator
Posts: 11272
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker » 2017-11-21, 21:00 UTC

Bebosher,
A Bug?
An option.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

User avatar
Dalai
Power Member
Power Member
Posts: 6694
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai » 2017-11-21, 21:12 UTC

For FTP also the copy direction matters. Downloading a file from FTP and keeping the date is an option alright. There's also a setting (in wcx_ftp.ini) to make it checked by default:
TC help, section 4.b) wrote:[default]
PreserveDates=0/1
Preserve file date/time on downloads
However, uploading a file to FTP requires the server to support setting the timestamp of the file. It it doesn't support it, the file will get the current date/time. And there's nothing you can do about that, unless you're the administrator of the FTP server software.

Regards
Dalai
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups

Bebosher
Junior Member
Junior Member
Posts: 7
Joined: 2017-03-01, 12:27 UTC

Post by *Bebosher » 2017-11-21, 21:37 UTC

Dalai wrote:...unless you're the administrator of the FTP server software.
Yes, I am. It's my Synology disc station.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 37631
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2017-11-21, 21:46 UTC

TC looks in the reply to the FEAT (and HELP SITE) commands whether the server supports one of the commands to send the time stamp:
MDTM, MFMT or SITE UTIME.

If your server supports one of these but does NOT report it, you can tell TC to use them anyway. You need to add one of the following values to wcx_ftp.ini, in the section of your connection:

SpecialFlags=4096
SpecialFlags=8192
SpecialFlags=12288

The first is for MDTM, the second for MFMT, and the last for SITE UTIME.

You will get an error if you set one of them but the server doesn't actually support the command.
Author of Total Commander
http://www.ghisler.com

User avatar
Dalai
Power Member
Power Member
Posts: 6694
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai » 2017-11-21, 22:01 UTC

Well, you should check whether any the commands used to set a timestamp is supported by your FTP server. You can see possible commands e.g. on this page. Take a look at the FTP log in TC (double click on the two lines of text shown above the panels while connected via FTP).

If your server doesn't announce support for any of these commands, you could take a look into the FTP server's settings; maybe it has an option that has something to do with setting timestamps of files. If you can't find anything, try searching for the FTP server name and any of the commands, e.g. "<synology-ftp-server-name> ftp mdtm" or something. There's also an old thread on the Synology forum, which doesn't look like you should keep your hopes up. I guess you should think about transferring files in a different way if timestamps are important...

[EDIT] Man, I'm slow today, but I'll leave the post as it is anyway. [/EDIT]

Regards
Dalai
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups

Bebosher
Junior Member
Junior Member
Posts: 7
Joined: 2017-03-01, 12:27 UTC

Post by *Bebosher » 2017-11-22, 05:53 UTC

Thanks to all. That was a very constructive thread.

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

Re: When copying via FTP, the date is set to "today"

Post by *krapet » 2019-10-09, 10:40 UTC

Christian, could you think about modify window - FTP: connection details ?

More user friendly is to choose method of time synchronization witch selection of: NONE, MDTM, MFMT or SITE UTIME
instead of modifying ini file with:
SpecialFlags=4096
SpecialFlags=8192
SpecialFlags=12288
Or even better is to implement all ways referred by Dalai in previous post.

Another issue relates to remote servers.
For its which don't use UTC it is necesary to corrects it.
Very useful can be possibility to use "Outgoing time shift" and "Incoming time shift" for file timestamps.
And also to have check box "Daylight saving".

Now the TC set timestamp always in UTC.
When server uses time zone -1:00 (or more) there it is not so big issue as when uses time zone +1:00 (or more).
In first case the time is "only" shifted.
In second case it is worse. The first 60 minutes (or multiples of hours) the server reports timestamp without time (only date is present) and TC show time 0:00. This is totally bad.

It can be nice to have button to "Autocheck time shift" which will to try to set way of timestamp method automatically.

I also found that checkbox SSL/TLS may not be sufficient. Some servers distinguish between implicit and explicit methods.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 37631
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: When copying via FTP, the date is set to "today"

Post by *ghisler(Author) » 2019-10-10, 10:33 UTC

More user friendly is to choose method of time synchronization witch selection of: NONE, MDTM, MFMT or SITE UTIME
instead of modifying ini file
Normally this isn't necessary because well written FTP servers report in the reply to the FEAT command when they support these commands.
Another issue relates to remote servers.
For its which don't use UTC it is necesary to corrects it.
Very useful can be possibility to use "Outgoing time shift" and "Incoming time shift" for file timestamps.
Currently this is only in the sync tool. Modern servers support the MLSD (machine list directory) command, which uses UTC by definition.
I also found that checkbox SSL/TLS may not be sufficient. Some servers distinguish between implicit and explicit methods.
You can use prefix ftpis:// and ftpes:// instead of ftps.
Author of Total Commander
http://www.ghisler.com

Post Reply