This clock provides 10 seconds of real-time atomic clock data from the US Naval Observatory in Washington D.C. Press "Reload" to restart the display. Note...this does not work with Microsoft Internet Explorer. Microsoft has a bug in their support of multipart/x-mixed-replace content type. Safari also fails to display this clock, while Mozilla, Netscape, and Firefox displays it correctly.
Here is the HTML code to call the Atomic Clock display:
<img src="http://tycho.usno.navy.mil/cgi-bin/nph-usnoclock.gif? zone=CDT|ticks=10" alt="Sorry, IE Is Not Supported">
Here is the HTML code to call this time display:
<img src="http://tycho.usno.navy.mil/cgi-bin/xbmclock.xbm?zone=CDT">
Here is the JAVAscript code for the local time display below. Place this code in the <Head> section of your HTML page.
<script type="javascript">
<!--
function showTime() {
var now = new Date()
var hrs = now.getHours()
var mins = now.getMinutes()
var secs = now.getSeconds()
var mm = ((hrs>11) ? " PM" : " AM")
hrs=((hrs>12) ? (hrs-12) : hrs)
hrs=((hrs==0) ? 12 : hrs)
var disp = "Local Time: " + hrs + ":"
disp += ((mins<10) ? "0" : "" ) + mins + ":"
disp += ((secs<10) ? "0" : "" ) + secs + mm
status = disp
setTimeout("showTime()",20)
}
// -->
</script>
To actually run this script, add the following code to
your <body> tag:
<body onLoad="showTime()">
Return To John Weeks Hobby Page
Return To John Weeks Home Page
Authored by John A. Weeks III, Copyright © 1996, all rights reserved.
For further information, contact:
john@johnweeks.com