Fix PM hours

pull/1945/head
Hank 2022-06-12 21:13:28 +02:00
parent 516814cdf8
commit 38f23be5b4
3 changed files with 6 additions and 15 deletions

View File

@ -1,4 +1,5 @@
0.15: Initial release - be patient as this is the first try :)
0.16: Fix timing
0.17: Fix hours
0.18: Code cleanup and major changes with seconds timing. New feature: if watch is locked, seconds get refreshed every 10 seconds.
0.18: Code cleanup and major changes with seconds timing. New feature: if watch is locked, seconds get refreshed every 10 seconds.
0.19: Fix PM Hours

View File

@ -19,7 +19,6 @@ const font = "6x8";
/* TODO: we could totally use 'Layout' here and
avoid a whole bunch of hard-coded offsets */
const xyCenter = g.getWidth() / 2;
const xyCenterSeconds = xyCenter + (big ? 85 : 68);
const yAmPm = xyCenter - (big ? 70 : 48);
@ -171,7 +170,8 @@ function draw() {
//do 12 hour stuff
if (hours > 12) {
ampm = "PM";
hours = hours - 12;
hours = hours - 12;
if (hours < 10) hours = doublenum(hours);
} else {
ampm = "AM";
}
@ -200,8 +200,6 @@ function draw() {
g.setFont("Vector", 17);
g.drawString(require("locale").dow(new Date(), 1).toUpperCase() + ", " + localDate, xyCenter, yposDate, true);
g.setFont(font, primaryDateFontSize);
// set gmt to UTC+0
var gmt = new Date(d.getTime() + d.getTimezoneOffset() * 60 * 1000);
@ -345,12 +343,4 @@ Bangle.on('lock',on=>{
draw(); // draw immediately, queue redraw
updatePos();
}
});
});

View File

@ -2,7 +2,7 @@
"id": "hworldclock",
"name": "Hanks World Clock",
"shortName": "Hanks World Clock",
"version": "0.18",
"version": "0.19",
"description": "Current time zone plus up to three others",
"allow_emulator":true,
"icon": "app.png",