Reporting and TZ updates
This commit is contained in:
+9
-2
@@ -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())) {
|
||||
|
||||
Reference in New Issue
Block a user