Skip to content

Commit

Permalink
🐛 Drop UTC offset for local time used in tasks table (#1994)
Browse files Browse the repository at this point in the history
The API provides date/time in UTC. For user convenience 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".

Part-of: #1969

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
  • Loading branch information
rszwajko authored Jul 3, 2024
1 parent 5735197 commit 490a04b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/app/pages/tasks/tasks-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 490a04b

Please sign in to comment.