diff --git a/.changeset/tame-brooms-obey.md b/.changeset/tame-brooms-obey.md new file mode 100644 index 0000000..7ca8250 --- /dev/null +++ b/.changeset/tame-brooms-obey.md @@ -0,0 +1,6 @@ +--- +"evalite": patch +"@evalite/core": patch +--- + +Fixed a bug where the UI was showing times in UTC. diff --git a/apps/evalite-ui/app/components/ui/live-date.tsx b/apps/evalite-ui/app/components/ui/live-date.tsx index 4830cb0..5f1c3bd 100644 --- a/apps/evalite-ui/app/components/ui/live-date.tsx +++ b/apps/evalite-ui/app/components/ui/live-date.tsx @@ -11,9 +11,14 @@ export const LiveDate = (props: { date: string; className?: string }) => { }, ONE_MINUTE); return () => clearInterval(interval); }, []); + + const utcDate = new Date(props.date + "Z"); + return ( - {formatDistance(props.date, new Date(), { addSuffix: true })} + {formatDistance(utcDate, new Date(), { + addSuffix: true, + })} ); };