From 0dae8ded13160f1f52f06bdaf1bd0cc98649226d Mon Sep 17 00:00:00 2001 From: Craig Quiter Date: Sat, 15 Feb 2025 10:37:40 -0800 Subject: [PATCH] fix: return local date from `getFormattedDate` --- src/lib/utils/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index 4d1e92f04..0ce738762 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -1000,7 +1000,10 @@ export const bestMatchingLanguage = (supportedLanguages, preferredLanguages, def // Get the date in the format YYYY-MM-DD export const getFormattedDate = () => { const date = new Date(); - return date.toISOString().split('T')[0]; + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; }; // Get the time in the format HH:MM:SS