Re: MDTM problem on Titan

Giganews Newsgroups
Subject: Re: MDTM problem on Titan
Posted by:  J. Peter Mugaas (oma002…
Date: Wed, 23 Feb 2005

On Wed, 23 Feb 2005 00:26:26 -0500, Michael J. Leaver wrote:
> Hi, there appears to be a problem setting the remote file date &
> time on Titan 3.30 FTP servers using Indy 10. The problem is that
> Indy ignores the FTZInfo.FGMTOffset value, and instead uses the
> value from MinutesFromGMT (IdFTPCommon.pas), which is the clients
> offset from GMT.
> So no matter what I do it's applying the clients GMT offset to the
> MDTM value, even though the server is in the same timezone.
> Changing the timezone setting in Titan has no effect.
> If I manually do:
> FTPClient.SendCmd('MDTM '+ FTPDateTimeToMDTMD(ADateTime -
> OffSetFromUTC + FTPClient.TZInfo.GMTOffset,False,False)+ '
> '+AFileName,[253]);
> Then it works fine.
Forgive me for being late as I wanted to be sure about something and my memory was vague on a technical point (which is important in your case).  This MDTM question ir related to one you had posted earlier about a Serv-U FTP Server.  The reason why the code was ignoring FTZInfo.FGMTOffset  was because there are 3 syntaxes for the MDTM command.

The first syntax is one used by current Serv-U versions and servers that report "MDTM YYYYMMDDHHMMSS[+-TZ];filename " in their FEAT replies is:

1) MDTM [Time in GMT format] Filename

some Bullete Proof FTPD versions, Indy's FTP Server component, and servers reporting "MDTM YYYYMMDDHHMMSS[+-TZ] filename" in their FEAT replies uses an older Syntax which is:

2) MDTM yyyymmddhhmmss[+-minutes from Universal Time] Filename

and then there is the classic

3) MDTM [local timestamp] Filename

So for example, if I was a file dated Jan 3, 5:00:00 pm from my computer in the Eastern Standard Time (-5 hours from Universal Time), the 3 syntaxes
Indy would use are:

Syntax 1:

1) MDTM 0103220000 MyFile.exe  (notice the 22 hour)

Syntax 2:

2) MDTM 0103170000-300 MyFile.exe (notice the 17 hour and the -300 offset)

Syntax 3;

3) MDTM 0103170000 MyFile.exe

Now, that I've mentioned these syntaxes, I have two questions about both this MDTM thread and the previous MDTM thread.

1) Did the Serv-U FTP server you mentioned on Feb 11 accept the second syntax?

1) Does the Titan FTPD Server you mentioned in this thread accept the second syntax?

These are important because I was coding some specific things for BPFTPD, Serv-U, and TitanFTPD in TIdFTP (now you see why I was so particular about that server in my reply to your earlier thread).  The coding was to use the SITE ZONE command (I know all three of those servers use support SITE ZONE even if that isn't reported in their FEAT replies).  I want to make sure that I am using the correct MDTM syntax with those servers and if not, I can easily make an adjustment to the FTP code.

Please get back to me about this.
J. Peter Mugaas - Indy Pit Crew
Internet Direct (Indy) Website -
Personal Home Page -
If I want to do business with you, I will contact you.  Otherwise, do not contact me.


In response to

MDTM problem on Titan posted by Michael J. Leaver on Wed, 23 Feb 2005