Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The Dtae & Time of the Client side

Status
Not open for further replies.

eyal

Programmer
May 15, 2000
38
IL
Hi,<br>How can I know the Date & time of the client side?<br>ie, the server is located in the states and the client is in europe, how can I know the date & Time in europe?<br>Thanks<br>Eyal
 
Dear eyal,<br><br>My first thought is that you would have to write a client side script to send it to your server code. I don't think it is included in any of the HTTP headers.<br><br>&lt;body&gt;<br>&lt;%<br>&nbsp;&nbsp;var clientTime = new String(Request(&quot;cliTime&quot;));<br>&nbsp;&nbsp;if ( clientTime.indexOf('undefined') == 0){<br>%&gt;<br>&lt;script language=javascript&gt;<br>&lt;!--<br>var dt = new Date();<br>window.location = &quot;mypage.asp?cliTime=&quot; + dt.getHours() + &quot;:&quot; + dt.getMinutes();<br>//--&gt;<br>&lt;/script&gt;<br><br>&lt;%<br> }<br>%&gt;<br>Client Time: &lt;%=clientTime%&gt;&lt;br&gt;<br>&lt;/body&gt;<br><br>Good luck<br>-pete<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top