From ddc2e7fe15f318b4ca3ba953539f63b0859ebb8f Mon Sep 17 00:00:00 2001 From: Kalista Payne Date: Mon, 30 Sep 2024 12:35:19 -0500 Subject: [PATCH 1/3] fix(cron): record nextDue as ISO string --- website/server/libs/cron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/server/libs/cron.js b/website/server/libs/cron.js index 39d548de2fc..c30f26cedf4 100644 --- a/website/server/libs/cron.js +++ b/website/server/libs/cron.js @@ -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.toISOString(); } } From e0c67e85876a10b84d482c26233179cd129fc32a Mon Sep 17 00:00:00 2001 From: Kalista Payne Date: Mon, 30 Sep 2024 12:48:40 -0500 Subject: [PATCH 2/3] fix(cron): nextDue is an array --- website/server/libs/cron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/server/libs/cron.js b/website/server/libs/cron.js index c30f26cedf4..829426b9903 100644 --- a/website/server/libs/cron.js +++ b/website/server/libs/cron.js @@ -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.toISOString(); + task.nextDue = nextDue.map(dueDate => dueDate.toISOString()); } } From 8bef050cc75346089f56889aa649d5c5fb83d9d4 Mon Sep 17 00:00:00 2001 From: Kalista Payne Date: Tue, 1 Oct 2024 17:37:27 -0500 Subject: [PATCH 3/3] fix(dates): record history in ISO --- website/server/libs/cron.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/server/libs/cron.js b/website/server/libs/cron.js index 829426b9903..d434a1fe60d 100644 --- a/website/server/libs/cron.js +++ b/website/server/libs/cron.js @@ -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