mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-21 05:08:51 +00: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:
parent
3d7d7e034f
commit
4d7304ab8d
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue