diff --git a/apps/sleeplog/boot.js b/apps/sleeplog/boot.js index 17e5fe70a..2ab8f9eff 100644 --- a/apps/sleeplog/boot.js +++ b/apps/sleeplog/boot.js @@ -260,7 +260,7 @@ if (sleeplog.conf.enabled) { var triggers = Object.keys(this.trigger) || []; if (triggers.length) { // calculate time from timestamp in ms on full minutes - var time = new Date(data.timestamp); + var time = new Date(); time = (time.getHours() * 60 + time.getMinutes()) * 60 * 1000; // go through all triggers triggers.forEach(key => {