Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > view server time

Reply
Thread Tools

view server time

 
 
john
Guest
Posts: n/a
 
      09-02-2003
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.
 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      09-02-2003
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)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is time.time() < time.time() always true? flamesrock Python 8 11-24-2006 06:51 AM
Edit Mode of Grid View and Detail View Control ? Luqman ASP .Net 2 02-01-2006 08:14 AM
Icon View and list View in ASP.NET =?Utf-8?B?UmFlZCBTYXdhbGhh?= ASP .Net 0 03-07-2005 06:53 PM
How to make a week view and day view calendar just like month view calendar in .NET ? Parthiv Joshi ASP .Net Web Controls 1 07-06-2004 03:15 PM
Wierd error when going to Design View from HTML view VB Programmer ASP .Net 1 07-10-2003 03:20 PM



Advertisments