mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
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
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user