Skip to content

Commit bbf50fa

Browse files
committed
schedclock: fix last to be yesterday/today; not tomorrow
1 parent 399aa87 commit bbf50fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/schedclock/lib.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ exports.syncAlarms = function() {
6666

6767
const schedTime = (item.hour * 3600000) + (item.minute * 60000);
6868
const today = time.getDate();
69-
const tomorrow = today + 1;
69+
const yesterday = today - 1;
7070

7171
// Create the new alarm object and save it using a unique ID.
7272
Sched.setAlarm(`${APP_ID}.${index}`, {
7373
t: schedTime, // time in milliseconds since midnight
7474
on: true,
7575
rp: true,
76-
last: (schedTime > currentTime) ? today : tomorrow,
76+
last: (schedTime > currentTime) ? yesterday : today,
7777
dow: item.dow,
7878
hidden: true,
7979
appid: APP_ID,

0 commit comments

Comments
 (0)