I need to display time that is currently on my web server on a webpage. All the scripts I have seen display only time on the clients machine. Could you please help
Announcement
Collapse
No announcement yet.
server time on my page
Collapse
X
-
-
Got PHP? This will work
PHP Code:<?
echo date("l j F Y");
?>
Comment
-
This Code In ASP:
Code:<html> <body> <% dim todaysDate todaysDate=now() %> <% Response.write todaysDate Response.write("<br>") %> <% Response.write FormatDateTime(todaysDate,0) Response.write("<br>") %> <% Response.write FormatDateTime(todaysDate,1) Response.write("<br>") %> <% Response.write FormatDateTime(todaysDate,2) Response.write("<br>") %> <% Response.write FormatDateTime(todaysDate,3) Response.write("<br>") %> <% Response.write FormatDateTime(todaysDate,4) %> </body> </html>
Will Produce The Server Time In This Format:
6/18/2002 3:59:24 PM
6/18/2002 3:59:24 PM
Tuesday, June 18, 2002
6/18/2002
3:59:24 PM
15:59
Comment
-
It can be done by calcukating GMT difference from your server time zone.
Visit this page:
Several tips to do what you are looking for.
Comment
Comment