mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-04-14 19:47:03 +00:00
Date format corrections (#15333)
* fix(cron): record nextDue as ISO string * fix(cron): nextDue is an array * fix(dates): record history in ISO
This commit is contained in:
parent
af17930314
commit
97e0b31a3d
1 changed files with 3 additions and 3 deletions
|
|
@ -27,7 +27,7 @@ function setIsDueNextDue (task, user, now) {
|
|||
optionsForShouldDo.nextDue = true;
|
||||
const nextDue = common.shouldDo(now, task, optionsForShouldDo);
|
||||
if (nextDue && nextDue.length > 0) {
|
||||
task.nextDue = nextDue;
|
||||
task.nextDue = nextDue.map(dueDate => dueDate.toISOString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -439,7 +439,7 @@ export async function cron (options = {}) {
|
|||
});
|
||||
|
||||
// Finished tallying
|
||||
user.history.todos.push({ date: now, value: todoTally });
|
||||
user.history.todos.push({ date: now.toISOString(), value: todoTally });
|
||||
|
||||
// tally experience
|
||||
let expTally = user.stats.exp;
|
||||
|
|
@ -449,7 +449,7 @@ export async function cron (options = {}) {
|
|||
expTally += common.tnl(lvl);
|
||||
}
|
||||
|
||||
user.history.exp.push({ date: now, value: expTally });
|
||||
user.history.exp.push({ date: now.toISOString(), value: expTally });
|
||||
|
||||
// Remove any remaining completed todos from the list of active todos
|
||||
user.tasksOrder.todos = user.tasksOrder.todos
|
||||
|
|
|
|||
Loading…
Reference in a new issue