Danny74 Posted April 10, 2009 Posted April 10, 2009 I have replaced the original date code with the following script. Does anyone know if it is region-specific? If it reads 5:00 AM in Chicago, will it read 3:00 AM in New York? <title>Today's Date</title> <script language="JavaScript"> // Define a function for use later on. function print_todays_date() { var d = new Date(); // Get today's date and time document.write(d.toLocaleString()); // Insert it into the document } </script> </head> <body> <script language="JavaScript"> // Now call the function we defined above. print_todays_date(); </script>
♥geoffreywalton Posted April 10, 2009 Posted April 10, 2009 Without working out where the browser is based and then adjusting the time everyone gets the same time displayed. Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.