server time...

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I need a script in, in javascript, in java or in flash, where i
can display in my web site the server time.
note: the server time, not the client!

thank u for your help!


Re: server time...

tranky wrote:

Quoted text here. Click to load it

This can't be done in Javascript or Flash, but could be done in
server-side Java, though that's unlikely to be what you meant by "Java".

In any server-side script it should be trivial. For example, in ASP.NET:

    <% Response.Write(now()) %>


    <?php echo date('r'); ?>

With a little work you can then change the format to something you prefer,
e.g. HH:mm.

Toby A Inkster BSc (Hons) ARCS
Contact Me  ~

Re: server time...

In ASP a far friendlier display would be:-

Response.write "Date: " & FormatDateTime(now(),2)

Site Timeline