From 93c2429bf57aeb3a16c3212982a97efaab359d01 Mon Sep 17 00:00:00 2001 From: eyecreate Date: Fri, 25 Nov 2022 12:51:08 -0500 Subject: [PATCH 1/3] Add locale time support to watch --- apps/slopeclockpp/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/slopeclockpp/app.js b/apps/slopeclockpp/app.js index 013c25733..bf719344e 100644 --- a/apps/slopeclockpp/app.js +++ b/apps/slopeclockpp/app.js @@ -51,8 +51,9 @@ let draw = function() { x = R.w / 2; y = R.y + R.h / 2 - 12; // 12 = room for date var date = new Date(); - var hourStr = date.getHours(); - var minStr = date.getMinutes().toString().padStart(2,0); + var local_time = require("locale").time(date, 1); + var hourStr = local_time.split(":")[0].trim().padStart(2,'0'); + var minStr = local_time.split(":")[1].trim().padStart(2, '0'); dateStr = require("locale").dow(date, 1).toUpperCase()+ " "+ require("locale").date(date, 0).toUpperCase(); From ebc2091c2994e8aea228da0a2e379258e74103d8 Mon Sep 17 00:00:00 2001 From: eyecreate Date: Fri, 25 Nov 2022 12:52:13 -0500 Subject: [PATCH 2/3] Update metadata --- apps/slopeclockpp/metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/slopeclockpp/metadata.json b/apps/slopeclockpp/metadata.json index b419ef898..bebed4b71 100644 --- a/apps/slopeclockpp/metadata.json +++ b/apps/slopeclockpp/metadata.json @@ -1,6 +1,6 @@ { "id": "slopeclockpp", "name": "Slope Clock ++", - "version":"0.05", + "version":"0.06", "description": "A clock where hours and minutes are divided by a sloping line. When the minute changes, the numbers slide off the screen. This is a clone of the original Slope Clock which shows extra information and allows the colors to be selected.", "icon": "app.png", "screenshots": [{"url":"screenshot.png"}], From 58fbe0455eb4ae11e038ed534a2da3b5e71e665d Mon Sep 17 00:00:00 2001 From: eyecreate Date: Fri, 25 Nov 2022 12:52:37 -0500 Subject: [PATCH 3/3] Update ChangeLog --- apps/slopeclockpp/ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/slopeclockpp/ChangeLog b/apps/slopeclockpp/ChangeLog index b5e455f78..9ae4ccc96 100644 --- a/apps/slopeclockpp/ChangeLog +++ b/apps/slopeclockpp/ChangeLog @@ -5,3 +5,4 @@ Made fonts smaller to avoid overlap when (eg) 22:00 Allowed black/white background (as that can look nice too) 0.05: Images in clkinfo are optional now +0.06: Added support for locale based time