Could someone please tell me what is wrong with the following logic, I've used this in a previous implementation but my updated watch face is having issues:
function onUpdate(dc)
{
var clock = Sys.getClockTime();
var timeDisplay = getClockTime(clock);
...
}
hidden function getClockTime(clockTime)
{
var hour, min, ampm, result;
hour = clockTime.hour;
min = clockTime.min.format("%02d");
if (devSettings.is24hour)
{
hour = hour.format("%02d");
result = Lang.format("$1$:$2$", [hour, min]);
}
else
{
ampm = (hour > 11) ? "PM" : "AM";
hour = hour % 12;
hour = (hour == 0) ? 12 : hour;
hour = hour.format("%02d");
result = Lang.format("$1$:$2$ $3$", [hour, min, ampm]);
}
return result;
}
For some reason when 9 AM hits, the time displayed indicates midnight and it looks like it might only be on the Forerunner 230 watches. I have my vivoactive set to 12 hour format right now and its fine. I just got a friend who reported the issue is still present, not sure what else could be wrong. Thanks in advance!