PDA

View Full Version : Live Clock Script Bug



ashwinuae
07-09-2005, 08:31 AM
There is a bug in the live clock script in this page Live Clock (http://www.dynamicdrive.com/dynamicindex6/clock2.htm).

The Clock displays 12 AM at noon when it must have been 12 PM.
This can be corrected by changing the following line of code
if (hours > 12) { dn = "PM"; hours = hours - 12; }

Change the 12 to 11, ie.
if (hours > 11) { dn = "PM"; hours = hours - 12; }

thanx ;)