From 4f5d12553188a834c9a0ebe26e0ae0dd57da1d07 Mon Sep 17 00:00:00 2001 From: Olly Hearn Date: Sun, 14 Apr 2024 01:39:37 +0300 Subject: [PATCH] be aware about making time local --- frontend/app/src/components/news/NewsListCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/src/components/news/NewsListCard.tsx b/frontend/app/src/components/news/NewsListCard.tsx index 5c0b302..4629cde 100644 --- a/frontend/app/src/components/news/NewsListCard.tsx +++ b/frontend/app/src/components/news/NewsListCard.tsx @@ -5,7 +5,7 @@ import { News, useGetNewsQuery } from "../../slice/NewsApi"; import { ClockCircleOutlined } from "@ant-design/icons"; const formatTime = (s: string) => { - const d = new Date(s); + const d = new Date(s + "Z"); return d.toLocaleString(); };