From 2c349422e3e1b6cd40146161f6358e153394f429 Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Tue, 6 Feb 2024 20:29:42 +0100 Subject: [PATCH] Fixed streak not using local time --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 7f5c8b5..dee5b7a 100644 --- a/index.html +++ b/index.html @@ -330,7 +330,7 @@ let classes = ["bi"] const adjustedDate = new Date((new Date()).getTime() - offset * 24 * 60 * 60 * 1000); - const formattedDate = adjustedDate.toISOString().split('T')[0]; + const formattedDate = adjustedDate.getFullYear().toString() + "-" + (adjustedDate.getMonth() + 1).toString().padStart(2, "0") + "-" + adjustedDate.getDate().toString().padStart(2, "0"); if (streakData.length > 0) { if (streakData.includes(formattedDate)) {