use client local time for date display
This commit is contained in:
parent
9949b973bd
commit
325ab38fbb
@ -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 (
|
||||||
|
Loading…
Reference in New Issue
Block a user