Getting server time from a client stack accessing it

Frank Leahy frank at backtalk.com
Mon Apr 5 12:17:25 EDT 2004


On Monday, April 5, 2004, at 11:38  AM, 
use-revolution-request at lists.runrev.com wrote:

> Date: Mon, 5 Apr 2004 11:02:20 +0200
> From: "Andre Rombauts" <andre.rombauts at win.be>
> Subject: Getting server time from a client stack accessing it
> To: "'How to use Revolution'" <use-revolution at lists.runrev.com>
> Message-ID: <200404050901.i3591YdV029508 at outmx005.isp.belgacom.be>
> Content-Type: text/plain;	charset="iso-8859-1"
>
> Anyone having a good way of getting a server time? I thought of using 
> .asp
> or .php files run on the server to generate a file that could be read 
> by the
> Runrev stack but the application could possibly run with server that 
> have
> not enabled Asp or Php for the user... :-(
>
> André
>

Andre,

Most servers return the current server time in the Date: HTTP header, 
so you should be able to ask for any page on the server to get the 
time.  The date is formatted in a standard "Internet" time (see the RR 
docs).

The response headers will look like this:

HTTP/1.1 200 OK\r\n
Server: foo\r\n
Date: Mon, 05 Apr 2004 16:59:24 GMT\r\n
...\r\n
\r\n


-- Frank

p.s. Do you return the Date: header in your http server?


More information about the use-livecode mailing list