Log in

View Full Version : Live Clock (Mark Plachetta) broken



soundoctor
10-02-2008, 05:35 PM
1) Script Title: Live Clock

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex6/clock2.htm

3) Describe problem: AM/PM incorrect.

Of course i tried emailing the developer with a bounceback...

Many months ago it worked "OK". Now both the 'demo' on the DD site and the implementation on my site show incorrect AM/PM, rendering the script useless for my international visitors and contactees.

Then there's that old adage I shouldn't complain, it's free. But i am complaining. I do stuff all day for people that is "free" and it works.

ddadmin
10-03-2008, 01:12 AM
The DD demo works fine for me. The script simply uses your computer's time as the time to show, so the AM/PM portion is based on that as well. If you still have problems, please post more details, such as during what time of the day it's incorrect, making sure your PC's time is correct to start.

soundoctor
10-03-2008, 05:35 AM
My mistake I guess. I will experiment. Thank you.

bobcinlv
07-08-2010, 07:41 PM
The AM/PM indicator displays incorrectly between 12noon and 1pm. This is even the case with the demo display on this website: "Demo: The time is: 12:26:00 AM (I viewed this at 12:26pm). Take a look between 12n & 1pm at: http://www.dynamicdrive.com/dynamicindex6/clock2.htm .

The fix for this is to tweak one line of code:

// Set up the hours for either 24 or 12 hour display:
if (my12_hour) {
dn = "AM";
if (hours > 12) { dn = "PM"; hours = hours - 12; } if (hours == 0) { hours = 12; }
} else {
dn = "";
}

The above "if" statement should be changed to "11". For example:
if (hours > 11) { dn = "PM"; hours = hours - 12; }

Bob C
http://www.rendervisionsconsulting.com