From 3bd35c0ab0c6ab1daeeabaca774618debd3e7808 Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Thu, 25 Apr 2024 05:51:28 +0100 Subject: [PATCH] converted date in server table to local time --- agenta-web/src/components/ServerTable/index.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/agenta-web/src/components/ServerTable/index.tsx b/agenta-web/src/components/ServerTable/index.tsx index 8e34cbf27c..817432ead2 100644 --- a/agenta-web/src/components/ServerTable/index.tsx +++ b/agenta-web/src/components/ServerTable/index.tsx @@ -86,7 +86,14 @@ const ServerTable = ( props .fetchData?.(tableParams) .then((res) => { - setData(res.data) + const updatedResponse = { + ...res, + data: res.data.map((item) => ({ + ...item, + created_at: new Date(item.created_at).toISOString(), + })), + } + setData(updatedResponse.data) total.current = res.total || 0 }) .catch(console.error)