Merge pull request #3583 from ayshaL/fix/blank-screen-on-timezone

Fix: prevent blank screen crash when clearing timezone search field
This commit is contained in:
Alexander Holliday authored and GitHub committed 2026-04-29 12:13:40 -07:00
commit 100e569aa8
3 files changed
+10 -5

No files matched your search

+5 -2
View File
@@ -19,8 +19,11 @@ export const formatDateWithTz = (timestamp: string, format: string, timezone: st
if (!timestamp) {
return "Unknown time";
}
const formattedDate = dayjs(timestamp).tz(timezone).format(format);
return formattedDate;
try {
return dayjs(timestamp).tz(timezone).format(format);
} catch {
return dayjs(timestamp).utc().format(format);
}
};
export const tickDateFormatLookup = (range: string) => {