From 4d7304ab8dbfb5ab80e2292cf6404d1689869e0e Mon Sep 17 00:00:00 2001 From: Iffat Saiyara <37493187+Saiyara6133@users.noreply.github.com> Date: Fri, 30 Apr 2021 16:21:43 -0400 Subject: [PATCH] created a variable that stores yesterDay's utcoffset (#12860) passed this variable in shouldDo function call as timezoneUtcoffset shouldDo takes timezoneUtcoffset into account when running yesterday's dailies, which fixes DST mismatch issues --- website/client/src/components/notifications.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/client/src/components/notifications.vue b/website/client/src/components/notifications.vue index 4ccb64cc1e..d4ebf738d3 100644 --- a/website/client/src/components/notifications.vue +++ b/website/client/src/components/notifications.vue @@ -765,10 +765,12 @@ export default { hours: this.user.preferences.dayStart, }); + const yesterUtcOffset = yesterDay.utcOffset(); + dailys.forEach(task => { if (task && task.group.approval && task.group.approval.requested) return; if (task.completed) return; - const due = shouldDo(yesterDay, task); + const due = shouldDo(yesterDay, task, { timezoneUtcOffset: yesterUtcOffset }); if (task.yesterDaily && due) this.yesterDailies.push(task); });