kfsoft/MyDigitClock-By-Kfsoft.info — Issue #1: AM/PM problem when time is between 12:00PM and 12:59PM
Author: ggagnaux
Created: 2011-11-30 23:47:53+00:00
State: open

Hi,

When displaying the time with AM/PM enabled, the clock will display AM even if the actual time is between 12:00PM and 12:59PM.

Here's a fix:

In the showClock() method use the following code:

if (_options[id].bAmPm)
{
if (h>12)
{
h = h-12;
ampm = " PM";
}
else
{
if (h == 12) // new code
ampm = " PM"; // new code
else // new code
ampm = " AM"; // new code
}
}