From c7d270ed40a4e291772c6a964259fc9aa16f503f Mon Sep 17 00:00:00 2001 From: antvirf Date: Thu, 24 Oct 2024 07:16:52 +0800 Subject: [PATCH] fix: bug with 24 hr time going negative --- source/mattermetricsView.mc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/mattermetricsView.mc b/source/mattermetricsView.mc index 0d8029b..5fcaf51 100644 --- a/source/mattermetricsView.mc +++ b/source/mattermetricsView.mc @@ -272,6 +272,11 @@ class mattermetricsView extends WatchUi.WatchFace { utcHours = utcHours - 12; } } else { + // If its negative, need to add 24 + if (utcHours < 0) { + utcHours = utcHours + 24; + } + if (getApp().getProperty("UseMilitaryFormat")) { timeFormat = "$1$$2$"; hours = hours.format("%02d");