Topic Path: Symbol Reference > Classes > TIdFTP Class > TIdFTP Methods > SetModTimeGMT Method
TIdFTP.SetModTimeGMT Method

Sets the last modification time for the specified file.

procedure SetModTimeGMT(
    const AFileName: String; 
    const AGMTTime: TIdDateTime
File name to update on the remote file system.
Time value to use as the last modification time. 

SetModTimeGMT is a procedure that implements support for the FTP extension command that updates the last modification time for the specified file. 

AFileName is the file name on the remote FTP server file system, and can contain absolute or relative path information. When path information is omitted, the file must be located in the current directory on the remote file system. 

ALocalTime is the native date and time value to use as the last modification time for the specified file. ALocalTime contains the last modification time expressed in the GMT (UTC) timezone. 

SetModTimeGMT sends the FTP MFMT command using the value in ALocalTime to perform the update for the specified file name. 

Some FTP servers have inappropriately implemented this capability using the MDTM command. While this is considered an abuse of the MDTM implementation, TIdFTP will revert to using this mechanism when the server does not implement the MFMT extension command. In this situation, the value in TZInfo may also be used when the MDTM implementation does not support the MDTM YYYYMMDDHHMMSS[+-TZ] format. 

Use SetModTime to update the last modification time using a time value expressed in the FTP client's timezone. 

Use the Capabilities property or the IsExtSupported method to determine if the FTP MFMT or MDTM extension commands are supported in the FTP server implementation.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.