From a2fd46e35ccc8412b807b884fb54fe2605862b8e Mon Sep 17 00:00:00 2001 From: storm64 Date: Wed, 16 Nov 2022 23:26:23 +0100 Subject: [PATCH] [sleeplog] Correct calculation of time in trigger --- apps/sleeplog/boot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sleeplog/boot.js b/apps/sleeplog/boot.js index d787b8dff..17388da44 100644 --- a/apps/sleeplog/boot.js +++ b/apps/sleeplog/boot.js @@ -261,7 +261,7 @@ if (sleeplog.conf.enabled) { if (triggers.length) { // calculate time from timestamp in ms on full minutes var time = data.timestamp; - time = ((time.getHours() * 60) + time.getMinutes() * 60) * 1000; + time = (time.getHours() * 60 + time.getMinutes()) * 60 * 1000; // go through all triggers triggers.forEach(key => { // read entry to key