Reporting and TZ updates

This commit is contained in:
2026-06-28 07:37:41 -04:00
parent 5e12561fb2
commit c2e4d2adeb
18 changed files with 719 additions and 268 deletions
+9 -2
View File
@@ -631,8 +631,15 @@
if (!utcDateTimeString) return '';
try {
// Parse the ISO datetime string
const date = new Date(utcDateTimeString);
// API datetimes are UTC, but DB-backed values may arrive without a timezone suffix.
let normalizedDateTime = String(utcDateTimeString).trim();
if (!normalizedDateTime.includes('T')) {
normalizedDateTime = normalizedDateTime.replace(' ', 'T');
}
if (!/[zZ]|[+-]\d{2}:?\d{2}$/.test(normalizedDateTime)) {
normalizedDateTime += 'Z';
}
const date = new Date(normalizedDateTime);
// Check if valid date
if (isNaN(date.getTime())) {