From dd55bcc85f7aabece165fff7eee682e1d8313dbf Mon Sep 17 00:00:00 2001 From: Tarek Loubani Date: Sun, 9 Aug 2026 00:34:21 -0400 Subject: [PATCH] fix: date-only column display shifted one day behind in non-UTC timezones The formatValue method for datetime-date columns parsed date-only values (e.g. "2025-08-25") using the datetime format 'YYYY-MM-DD HH:mm:ss'. Since the input doesn't match the format, Moment.js falls back to ISO 8601 parsing, which interprets date-only strings as UTC midnight. When .format('ll') then converts to the user's local timezone, the date shifts back one day for users behind UTC (e.g. America/Toronto UTC-4). Fix: use 'YYYY-MM-DD' as the Moment parse format, which matches the actual value and ensures local-timezone parsing. This is consistent with getDateFormat() in TableCellDateTime.vue, which already uses 'YYYY-MM-DD' for the edit mode (and editing correctly showed the right date). Fixes #2705 Signed-off-by: Tarek Assisted-by: GLM:5.2 --- .../components/ncTable/mixins/columnsTypes/datetimeDate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/ncTable/mixins/columnsTypes/datetimeDate.js b/src/shared/components/ncTable/mixins/columnsTypes/datetimeDate.js index db3d9cf6d6..4e30efa1f9 100644 --- a/src/shared/components/ncTable/mixins/columnsTypes/datetimeDate.js +++ b/src/shared/components/ncTable/mixins/columnsTypes/datetimeDate.js @@ -15,7 +15,7 @@ export default class DatetimeDateColumn extends AbstractDatetimeColumn { } formatValue(value) { - return Moment(value, 'YYYY-MM-DD HH:mm:ss').format('ll') + return Moment(value, 'YYYY-MM-DD').format('ll') } sort(mode, nextSorts) {