1. Technology

Your suggestion is on its way!

An email with a link to:

http://javascript.about.com/library/bldtime2.htm

was emailed to:

Thanks for sharing About.com with others!

Improved Author Local Time

2. Get the Script

Join the Discussion

Questions? Comments?

More of this Feature

Introduction Configure the Script

The first step in using this script is to select the code from the text box below (there is a highlight all button beneath it to make this easier) and copy it into a file called datetime.js.

You next attach the script into your web page that you wish to display your timezone information on by adding the following code into the head section of your page.

<script type="text/javascript" src="datetime.js">
</script>

You also need to add a small piece of code into the body section so that the script knows where you want your location and local time to be displayed. The script will replace this code with two spans one containing the location information and the second containing the time and optionally the date. This second span uses id="time" to identify itself so the script can dynamically update it so you will need to avoid using that id elsewhere in your page.

<span id="datetime"></span>

The next step is to Configure the Script to work with your local timezone.

Introduction | Get the Script | Configure the Script
See More About

©2014 About.com. All rights reserved.