From f4525c6f78b6e7a49217c982b7d419e79971f570 Mon Sep 17 00:00:00 2001 From: Matrixes <46491408+matrixes@users.noreply.github.com> Date: Sat, 21 May 2022 11:51:12 +0200 Subject: [PATCH] Daily count reset fix --- apps/barcode/ChangeLog | 1 + apps/barcode/barcode.app.js | 2 +- apps/barcode/metadata.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/barcode/ChangeLog b/apps/barcode/ChangeLog index fd55ead4b..4f99f15ac 100644 --- a/apps/barcode/ChangeLog +++ b/apps/barcode/ChangeLog @@ -6,3 +6,4 @@ 0.06: Updates every 5 minutes when locked, or when unlock occurs. Also shows nr of steps. 0.07: Step count resets at midnight 0.08: Step count stored in memory to survive reloads. Now shows step count daily and since last reboot. +0.09: NOW it really should reset daily (instead of every other day...) diff --git a/apps/barcode/barcode.app.js b/apps/barcode/barcode.app.js index d8f478b21..89419f33c 100644 --- a/apps/barcode/barcode.app.js +++ b/apps/barcode/barcode.app.js @@ -393,7 +393,7 @@ function resetAtMidnight() { let night = new Date( now.getFullYear(), now.getMonth(), - now.getDate() + 1, // the next day, ... + now.getDate(), // the next day, ... 23, 58, 0 // ...at 00:00:00 hours ); let msToMidnight = night.getTime() - now.getTime(); diff --git a/apps/barcode/metadata.json b/apps/barcode/metadata.json index bb8a960fe..cef267b2b 100644 --- a/apps/barcode/metadata.json +++ b/apps/barcode/metadata.json @@ -2,7 +2,7 @@ "name": "Barcode clock", "shortName":"Barcode clock", "icon": "barcode.icon.png", - "version":"0.08", + "version":"0.09", "description": "EAN-8 compatible barcode clock.", "tags": "barcode,ean,ean-8,watchface,clock,clockface", "type": "clock",