From 90048fcd22df9db7b261ee2e1720bb9d40c2c217 Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Thu, 11 Dec 2025 08:28:28 +0100 Subject: [PATCH] manual parsing of date to avoid UTC issues --- frontend/app.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/app.js b/frontend/app.js index 308924e..8a09198 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -3419,7 +3419,14 @@ function noteApp() { // Format dates nicely if (key === 'date' || key === 'created' || key === 'modified' || key === 'updated') { - const date = new Date(value); + let date; + // Parse date-only strings (YYYY-MM-DD) as local dates to avoid timezone issues + if (typeof value === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(value)) { + const [year, month, day] = value.split('-').map(Number); + date = new Date(year, month - 1, day); // month is 0-indexed + } else { + date = new Date(value); + } if (!isNaN(date.getTime())) { return date.toLocaleDateString('en-US', { year: 'numeric',