Daily count reset fix

master
Matrixes 2022-05-21 11:51:12 +02:00
parent 9a153d9376
commit f4525c6f78
3 changed files with 3 additions and 2 deletions

View File

@ -6,3 +6,4 @@
0.06: Updates every 5 minutes when locked, or when unlock occurs. Also shows nr of steps. 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.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.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...)

View File

@ -393,7 +393,7 @@ function resetAtMidnight() {
let night = new Date( let night = new Date(
now.getFullYear(), now.getFullYear(),
now.getMonth(), now.getMonth(),
now.getDate() + 1, // the next day, ... now.getDate(), // the next day, ...
23, 58, 0 // ...at 00:00:00 hours 23, 58, 0 // ...at 00:00:00 hours
); );
let msToMidnight = night.getTime() - now.getTime(); let msToMidnight = night.getTime() - now.getTime();

View File

@ -2,7 +2,7 @@
"name": "Barcode clock", "name": "Barcode clock",
"shortName":"Barcode clock", "shortName":"Barcode clock",
"icon": "barcode.icon.png", "icon": "barcode.icon.png",
"version":"0.08", "version":"0.09",
"description": "EAN-8 compatible barcode clock.", "description": "EAN-8 compatible barcode clock.",
"tags": "barcode,ean,ean-8,watchface,clock,clockface", "tags": "barcode,ean,ean-8,watchface,clock,clockface",
"type": "clock", "type": "clock",