use client local time for date display

This commit is contained in:
tommy 2024-10-29 22:12:59 -04:00 committed by moonrailgun
parent 9949b973bd
commit 325ab38fbb

View File

@ -143,16 +143,16 @@ export const StatusPageHeader = ({ info, workspaceId }) => {
const formatDate = (date) => { const formatDate = (date) => {
const options = { const options = {
month: 'short', weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric', day: 'numeric',
hour: '2-digit', hour: '2-digit',
minute: '2-digit', minute: '2-digit',
timeZone: 'UTC',
hour12: true, hour12: true,
}; };
const formatted = new Date(date).toLocaleString('en-US', options); const formatted = new Date(date).toLocaleString('en-US', options);
const [monthDay, time] = formatted.split(','); return `Last updated ${formatted}`;
return `Last updated on ${monthDay} at${time} UTC`;
}; };
return ( return (