From d724674b3cfd5d82ac111cf704c14344fc41d51a Mon Sep 17 00:00:00 2001 From: Radoslaw Szwajkowski Date: Wed, 3 Jul 2024 15:03:13 +0200 Subject: [PATCH] Drop UTC offset for local time used in tasks table The API provides date/time in UTC. For user convinience we display it in the browser time zone. Before this PR, UTC offset for the local time zone was included. The format used is a subset of ISO 8601 which allows for predictable sorting in the table. Format string: "YYYY-MM-DD HH:mm:ss". Example date: "2024-07-03 13:21:44". Signed-off-by: Radoslaw Szwajkowski --- client/src/app/pages/tasks/tasks-page.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/app/pages/tasks/tasks-page.tsx b/client/src/app/pages/tasks/tasks-page.tsx index 3e9e2c9bc7..4b0f2ff131 100644 --- a/client/src/app/pages/tasks/tasks-page.tsx +++ b/client/src/app/pages/tasks/tasks-page.tsx @@ -242,8 +242,10 @@ export const TasksPage: React.FC = () => { preemption: String(!!policy?.preemptEnabled), createUser, pod, - started: started ? dayjs(started).format() : "", - terminated: terminated ? dayjs(terminated).format() : "", + started: started ? dayjs(started).format("YYYY-MM-DD HH:mm:ss") : "", + terminated: terminated + ? dayjs(terminated).format("YYYY-MM-DD HH:mm:ss") + : "", }); return (