Getting client computers local time

A

Andy B

How do you show the client computers local time on a page even if the page
is hosted in a totally different timezone?
 
G

Guest

How do you show the client computers local time on a page even if the page
is hosted in a totally different timezone?

using client (java)script

<script type="text/javascript">
var t= new Date();
alert(t);
</script>
 
G

Guest

Is there a way of doing this so mobile devices can show it?

<div>
   <script type="text/javascript">
       document.write(Date());
   </script>
</div>
Google for JavaScript date / time formatting options...

There are mobiles which do not support JavaScript. You would need to
prompt user to choose the time zone. Take a look at the following
thread for more details: http://forums.asp.net/p/1090269/1646091.aspx

Hope this helps
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top