view server time

Discussion in 'Javascript' started by john, Sep 2, 2003.

  1. john

    john Guest

    Is it possible to display the current time directly from the server,
    and not client-side...I have people in different time zones trying to
    view the same page and the times (based on client) are coming up
    different.

    Thanks.
    john, Sep 2, 2003
    #1
    1. Advertising

  2. john

    Evertjan. Guest

    john wrote on 02 sep 2003 in comp.lang.javascript:
    > Is it possible to display the current time directly from the server,
    > and not client-side...I have people in different time zones trying to
    > view the same page and the times (based on client) are coming up
    > different.


    1 by serverside code (ASP: Time is <%=now%> )

    2 by "GET"-ing the header:

    <script type="text/javascript">
    var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    xmlhttp.open("GET", "http://www.qwerty.com/", false);
    xmlhttp.send();
    alert(xmlhttp.getAllResponseHeaders().replace(/^(.*)[\s\S]*/,"$1"));
    </script>




    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Sep 2, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer
    Replies:
    1
    Views:
    590
    VB Programmer
    Jul 10, 2003
  2. =?Utf-8?B?UmFlZCBTYXdhbGhh?=

    Icon View and list View in ASP.NET

    =?Utf-8?B?UmFlZCBTYXdhbGhh?=, Mar 7, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    493
    =?Utf-8?B?UmFlZCBTYXdhbGhh?=
    Mar 7, 2005
  3. Luqman
    Replies:
    2
    Views:
    3,810
    Luqman
    Feb 1, 2006
  4. flamesrock
    Replies:
    8
    Views:
    449
    Hendrik van Rooyen
    Nov 24, 2006
  5. Parthiv Joshi
    Replies:
    1
    Views:
    655
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page