From da6fbbbcb8ee42d2c6f76e4c33d838f310d64d57 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Fri, 2 Oct 2026 22:08:48 +1000 Subject: [PATCH] FE: timestamp fix #1826 --- front/js/devices-table.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/front/js/devices-table.js b/front/js/devices-table.js index c46565d73..bf58b2ad0 100644 --- a/front/js/devices-table.js +++ b/front/js/devices-table.js @@ -498,10 +498,11 @@ function initializeDatatable (status) { // Dates {targets: [mapIndx(COL.devFirstConnection), mapIndx(COL.devLastConnection)], 'createdCell': function (td, cellData, rowData, row, col) { - var result = cellData.toString(); // Convert to string - if (result.includes("+")) { // Check if timezone offset is present - result = result.split('+')[0]; // Remove timezone offset - } + // devFirstConnection/devLastConnection are DB NOT NULL with no default, + // but that still permits an empty string (e.g. stale rows from an older + // schema/version) - skip localizeTimestamp() for that case instead of + // showing its "Failed conversion" fallback for what is really just "no value". + var result = isEmpty(cellData) ? '' : localizeTimestamp(cellData); $(td).html (translateHTMLcodes (result)); } },