FE: timestamp fix #1826

This commit is contained in:
jokob-sk committed 2026-10-02 22:08:48 +10:00
1 parent ebf12bfb66
commit da6fbbbcb8
1 file changed
+5 -4
+5 -4
View File
@@ -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));
} },