Skip to content

Commit

Permalink
feat: format time in local timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxuum committed Feb 10, 2024
1 parent 6b7835f commit 7049038
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ interface HistoryLineProps {
export function HistoryLine({ data, size, position, order }: HistoryLineProps) {
const rem = useRem();
const date = useMemo(() => {
const dateTime = DateTime.fromUnixTimestamp(
data.sentAt,
).FormatUniversalTime("LT", "en-us");
const dateTime = DateTime.fromUnixTimestamp(data.sentAt).FormatLocalTime(
"LT",
"en-us",
);
const dateParts = dateTime.split(" ");
return `<b>${dateParts[0]}</b> ${dateParts[1]}`;
}, [data]);
Expand Down

0 comments on commit 7049038

Please sign in to comment.