Emergency fixes on prod
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; normalize naive strings before local display.
|
||||
let utcDateStr = utcDateTimeString;
|
||||
if (!utcDateStr.includes('T')) {
|
||||
utcDateStr = utcDateStr.replace(' ', 'T');
|
||||
}
|
||||
if (!/[zZ]|[+-]\d{2}:\d{2}$/.test(utcDateStr)) {
|
||||
utcDateStr += 'Z';
|
||||
}
|
||||
const date = new Date(utcDateStr);
|
||||
|
||||
// Check if valid date
|
||||
if (isNaN(date.getTime())) {
|
||||
|
||||
Reference in New Issue
Block a user