From a7184802f75db2dcb68c509d23b4136621adc4f0 Mon Sep 17 00:00:00 2001 From: eyecreate Date: Mon, 15 Aug 2022 18:19:13 -0400 Subject: [PATCH 1/3] Update app to use time based on locale settings --- apps/macwatch2/app.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/macwatch2/app.js b/apps/macwatch2/app.js index 3b78d5baf..d0f3aafaa 100644 --- a/apps/macwatch2/app.js +++ b/apps/macwatch2/app.js @@ -30,15 +30,15 @@ function draw() { g.setFontAlign(0, -1, 0); g.setColor(0,0,0); var d = new Date(); - var da = d.toString().split(" "); - hh = da[4].substr(0,2); - mi = da[4].substr(3,2); + var dt = require("locale").time(d, 1); + var hh = dt.split(":")[0]; + var mm = dt.split(":")[1]; + g.drawString(hh, 52, 65, true); + g.drawString(mm, 132, 65, true); + g.drawString(':', 93,65); dd = ("0"+(new Date()).getDate()).substr(-2); mo = ("0"+((new Date()).getMonth()+1)).substr(-2); yy = ("0"+((new Date()).getFullYear())).substr(-2); - g.drawString(hh, 52, 65, true); - g.drawString(mi, 132, 65, true); - g.drawString(':', 93,65); g.setFontCustom(font, 48, 8, 521); g.drawString(dd + ':' + mo + ':' + yy, 88, 120, true); From 1f42e5022a17fe9ae5ff3b15f32c7cf66bbb44d1 Mon Sep 17 00:00:00 2001 From: eyecreate Date: Tue, 16 Aug 2022 10:05:36 -0400 Subject: [PATCH 2/3] updated changelog to 0.04 --- apps/macwatch2/ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/macwatch2/ChangeLog b/apps/macwatch2/ChangeLog index a60193ba7..8f1fd496e 100644 --- a/apps/macwatch2/ChangeLog +++ b/apps/macwatch2/ChangeLog @@ -1,3 +1,4 @@ 0.01: Created first version of the app with numeric date, only works in light mode 0.02: New icon, shimmied date right a bit 0.03: Incorporated improvements from Peer David for accuracy, fix dark mode, widgets run in background +0.04: Changed clock to use 12/24 hour format based on locale From 8566fbcdbc554f3f00525277d7d4e1eec04046dd Mon Sep 17 00:00:00 2001 From: eyecreate Date: Tue, 16 Aug 2022 10:05:49 -0400 Subject: [PATCH 3/3] Bumped version to 0.04 --- apps/macwatch2/metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/macwatch2/metadata.json b/apps/macwatch2/metadata.json index 09ec01e06..09e2c5243 100644 --- a/apps/macwatch2/metadata.json +++ b/apps/macwatch2/metadata.json @@ -2,7 +2,7 @@ "name": "MacWatch2", "shortName":"MacWatch2", "icon": "app.png", - "version":"0.03", + "version":"0.04", "description": "Classic Mac Finder clock", "type": "clock", "tags": "clock",