Skip to content

Commit

Permalink
fix: bug with 24 hr time going negative
Browse files Browse the repository at this point in the history
  • Loading branch information
Antvirf committed Oct 23, 2024
1 parent 0f6f035 commit c7d270e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/mattermetricsView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit c7d270e

Please sign in to comment.