Re: Time zone of the FTP server.

Giganews Newsgroups
Subject: Re: Time zone of the FTP server.
Posted by:  J. Peter Mugaas (oma002…@mail.wvnet.edu)
Date: Fri, 16 Apr 2004

On Fri, 16 Apr 2004 12:04:33 +0200, Marcel Horsthuis wrote:

> Hello All,
>
> I'm new to Indy and want to use the TidFtp component to do some
> synchronization on remote and local files.
>
> In an early lead (problems with dates) I saw some solutions with MDTM.
>
> Is it not useful to know what the time difference is between the FTP server
> and the local machine.
>
I agree that it is.  The MDTM command should obtain the date based on GMT
(or Universal Time).  You then should be able to use your time zone with
your own time zone settings.

> For this purpose I write a dummy file to the FTP server and just thereafter
> I get the timestamp from this dummy file from the server.
>
For the server, you should return the time as GMT.  I have some things in a
FTP Expansion Kit folder in VCS that can help.

I would also mention that in Indy 10, we support the MLST and MLSD machine
readable list commands.  Those return the time in GMT.

The FTP Voyager handles things is that it uses a SITE ZONE to return an
offeset from the server between it and GMT.  It then uses this value to
convert the times in the standard dir listing into GMT which is then
converted to the local time zone.

I Hope this helps.

Replies

In response to

Time zone of the FTP server. posted by Marcel Horsthuis on Fri, 16 Apr 2004