FTP - 'Preserve file dates' - but not hundredths of a second

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
HeRo
Junior Member
Junior Member
Posts: 38
Joined: 2011-01-19, 19:13 UTC
Contact:

FTP - 'Preserve file dates' - but not hundredths of a second

Post by *HeRo »

Hi!

It's quite well thought out, that you can choose 'Preserve file dates' when you copy to an FTP-server, but on the FTP-server, that I am trying to use as an online backup, the hundredths (fractions of a second) in the time-stamp are not preserved on the FTP-server, and that destroys "the perfect match" of the "Synchronize directories" function.

Can that problem be solved?
It seems the FTP-server is running something called Pure-FTPd - http://pureftpd.org/ .

Thank you everybody.

Love,
HeRo
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3854
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Can that problem be solved?
Bad cards ...

Let me first explain how 'Preserve file dates' works:
- After you transfered your file to the FTP server, the file time is set by the FTP server directly to its own local time.
- Next TC has to set the time for this file individually.
For this task TC has to use a command, which is supported by the FTP server.
Depending of the FTP server brand and version it may be one of SITE UTIME or MDTM or MFMT or alike.

AFAIK none of this commands supports fractions of a second.

This means, even is TC wants to set it like this, there is no command to do it :(
#5767 Personal license
HeRo
Junior Member
Junior Member
Posts: 38
Joined: 2011-01-19, 19:13 UTC
Contact:

Post by *HeRo »

OK! Thanks.

An alternative would be if the T.C. "Synchronize directories" function could ignore the fractions of a second, but I haven't seen such an option?!
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

sqa_wizard wrote:AFAIK none of this commands supports fractions of a second.
MFMT does. It uses time format defined in RFC 3659 and it allows optional fractions of seconds.

But according to my testing, TC does not set them when uploading the file (it calls MFMT without fractions of second). They're only preserved when downloading (server reports fractions of seconds and TC sets them in local filesystem).

But what I find really strange, in Synchronize directories, my TC seems to ignore time differences up to whole three seconds. It clearly shows different times for those files, but marks them as same. :shock: And it does that for both FTP and local FS. So how your TC can show files as different when their modification time differs by less than second, it's mystery for me...
User avatar
karlchen
Power Member
Power Member
Posts: 4601
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, HeRo.

There is a special section inside the Total Commander helpfile which explains how to use the "Synchronize Directories" function towards an FTP server.

Menus => Menu Commands => Synchronizes Dirs and from there
=> Synchronize dirs and FTP servers
=> Synchronize dirs with FTP and MLSD command

Are you sure that you are following the procedures explained there exactly?

If you use Synchronisze Dirs to an FTP server, the local files will receive the timestamps found on the FTP server after upload. So there is little chance of the timestamps differing by milliseconds.

If the FTP connection can use MLSD, timestamps will have hh24:mi:ss, no fractions of seconds.
If the FTP connection cannot use MLSD, but LIST, timestamps may not hold any seconds at all, which would equal 0, but only hh24:mi.

Kind regards,
Karl
HeRo
Junior Member
Junior Member
Posts: 38
Joined: 2011-01-19, 19:13 UTC
Contact:

Post by *HeRo »

OOPS!!

I just discovered that I have been saying something completely wrong!
It is not hundredths of a second that don't match, but seconds!!!

SORRY!!
SORRY!!

- HeRo
User avatar
karlchen
Power Member
Power Member
Posts: 4601
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, HeRo.

In case the FTP connection which is used for a "Synchronize Dirs" operation has been set to use the FTP LIST command, it may happen that the FTP server does not report seconds in the timestamps at all. - Depends on the FTP server. - Missing seconds will be interpreted as 0 by T.C.

In case the FTP connection which is used for a "Synchronize Dirs" operation has been set to use the FTP MLSD command, the FTP server will report timestamps including seconds.

Now I guess you know what the potential pitfall can be:

FTP server ABCD can handle both, LIST and MLSD.
Interchangeably, you use a configuration which tells the server to use LIST, and another configuration which tells the server to used MLSD,
then the effect may be that a part of your local files will suddenly differ from the server by a few seconds.

Could this have happened?

Kind regards,
Karl
HeRo
Junior Member
Junior Member
Posts: 38
Joined: 2011-01-19, 19:13 UTC
Contact:

Post by *HeRo »

karlchen wrote:Hello, HeRo.

... ...

Now I guess you know what the potential pitfall can be:

FTP server ABCD can handle both, LIST and MLSD.
Interchangeably, you use a configuration which tells the server to use LIST, and another configuration which tells the server to used MLSD,
then the effect may be that a part of your local files will suddenly differ from the server by a few seconds.

Could this have happened?

Kind regards,
Karl
I don't think so. I have only uploaded files with T.C., and I have only 1 TC-definition for that server (and I uploaded with 'Preserve file dates').
And my first problem was that T.C. > v.7.50 didn't work, because the server doesn't understand MLSD.

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

Post by *ghisler(Author) »

TC accepts a difference of up to 3 seconds as identical to work with FAT/FAT32 file systems which have an accuracy of 2 seconds. Due to rounding errors, there can be a difference of up to 3 seconds.
Author of Total Commander
https://www.ghisler.com
Post Reply