timetest - check the time on a FTP server

Overview

The timetest.exw Euphoria program for Windows (from now on called timetest) is a simple program for testing the time on a FTP server. When run at the command line with appropriate arguments it will show the local time and then determine and show the time on a FTP server for comparison purposes.

It is useful for determining if a FTP server is in a different timezone and also for how accurately the time on the FTP server has been set by the administrator responsible for it.

Using timetest

You need three pieces of information to run timetest.

(1) The host name or IP address of the FTP server

(2) The user name used to login to the FTP server

(3) The password required to login to the FTP server

For example if the host name of the FTP server is "ant.ficticious.net", the user name "bart" and the password "karumba" then run timetest as follows:

    exw timetest.exw ant.ficticious.net bart karumba

If it runs successfully the output from timetest should be similar to:

    ====================
    ===   TIMETEST   ===
    ====================

    Running FTP session to ant.ficticious.net ... done

    Local time details:

        Oct 17 18:44:37

    Remote time details:

        -rw-r-----  1 bart   other     16 Oct 17 16:43 timetest.zzz

    Press any key to exit ...

From the example output above it can be seen that the FTP server is in a time zone two hours behind the local machine. Also the clock on the FTP server is around a minute or so out (assuming that the clock on the local machine is correct of course :-)

Password prompting

It is not a good idea to type passwords on the command line. It is recommended that timetest is invoked as follows:

    exw timetest.exw ant.ficticious.net bart

Timetest will realise no password has been specified and prompt for one. When the password is typed '*' characters appear instead of the actual characters of the password.

If timetest is invoked with just the hostname - for example:

    exw timetest.exw ant.ficticious.net

then timetest will assume that the username is the same as the hostname. It will still prompt for the password.

Security - Temporary files might reveal password

When timetest runs it creates some temporary files on the local machine called:

    timetest.zzz
    timetest.ftp
    timetest.out

On the FTP server the following temporary file is created:

    timetest.zzz

Under normal operation these temporary files get deleted before timetest completes. However, if timetest fails for some reason then one or more of the temporary files might get left behind. Some of the temporary files will contain the password to the FTP server so if timetest behaves oddly then ensure that the temporary files have been deleted. If any of these temporary files still exist then delete them manually.

It just doesn't work!

If when you run timetest and you have double checked the host name, user name and password several times and no remote time details are displayed then it's time to read on ...

There are many different versions of the Windows operating system. The timetest program has been tested on Windows 95 OSR version B and on Windows NT version 4.0 with service pack 6a. It _should_ work on other versions of Windows like Windows 98, Windows ME, Windows 2000 etc. but there are no guarantees as the author does not have access to such systems to run timetest on.

Also there are many types of FTP server and many ways that an administrator of a FTP server can configure it. It is impossible to test against all such combinations.

One issue which the author does know of that may well cause problems is when a FTP server requires you to change to an initial directory after connection before putting any files. For example a FTP server may require you to:

    cd /html

before putting any files. If this is the case then setting the following environment variable:

    TIMETESTDIR

to the name of the initial directory as follows:

    SET TIMETESTDIR=/html

and then running timetest will hopefully produce better results.

Bugs

No known bugs at present.

Contacting the author

The author of timetest is Andy Cranston. The best way to contact Andy is to post a question regarding timetest on the Euphoria mailing list. Visit:

    http://www.rapideuphoria.com/

and click "The Mailing List" link for more details.

And finally ...

As with any "free" software timetest comes "as is".

If you find timetest useful then pass it onto a friend.

Thankyou for reading the documentation.


Last updated 20 March 2002