Skip to content

Commit a0db6f1

Browse files
authored
chore: show exact date and time of execution (#1259)
## Problem Difficult to identify executions on executions page as the displayed time of execution is a relative time (3 days ago, 4 hours ago, etc.) ## Solution Display the exact date and time of the execution: 9 Oct 2025, 9:08:53 pm. Align each execution to also show the exact date and time of the execution. ## Before & After Screenshots **BEFORE**: <img width="1252" height="505" alt="Screenshot 2025-10-13 at 10 25 10 AM" src="https://github.com/user-attachments/assets/571e7dc4-7bb5-465e-98cd-5dbbd30bbeeb" /> <img width="1313" height="264" alt="Screenshot 2025-10-13 at 10 25 25 AM" src="https://github.com/user-attachments/assets/084bf835-60ac-40ea-89d4-241ac182682a" /> **AFTER**: <img width="1251" height="500" alt="Screenshot 2025-10-13 at 10 25 38 AM" src="https://github.com/user-attachments/assets/6a4e725d-1376-42a2-bbba-1c187deb2ab2" /> <img width="1301" height="266" alt="Screenshot 2025-10-13 at 10 25 34 AM" src="https://github.com/user-attachments/assets/55fb2759-6c17-4817-aa79-3e644f33c1ef" /> ## Tests Sanity check: - [ ] Executions are displayed in descending order - [ ] Each execution displays the exact date and time directly
1 parent d168c1f commit a0db6f1

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

packages/frontend/src/components/ExecutionHeader/index.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Fragment, ReactElement, useCallback } from 'react'
44
import { BiChevronLeft } from 'react-icons/bi'
55
import { useNavigate, useSearchParams } from 'react-router-dom'
66
import { Flex, Icon, Link, Stack, Text } from '@chakra-ui/react'
7-
import { Button, Tooltip } from '@opengovsg/design-system-react'
7+
import { Button } from '@opengovsg/design-system-react'
88
import { DateTime } from 'luxon'
99

1010
import * as URLS from '@/config/urls'
@@ -92,15 +92,11 @@ function ExecutionId(props: Pick<IExecution, 'id'>) {
9292

9393
function ExecutionDate(props: Pick<IExecution, 'createdAt'>) {
9494
const createdAt = DateTime.fromMillis(parseInt(props.createdAt, 10))
95-
const relativeCreatedAt = createdAt.toRelative()
9695

9796
return (
98-
<Tooltip
99-
label={createdAt.toLocaleString(DateTime.DATETIME_MED_WITH_SECONDS)}
100-
aria-label="Created at tooltip"
101-
>
102-
<Text textStyle="body-1">{relativeCreatedAt}</Text>
103-
</Tooltip>
97+
<Text textStyle="body-1">
98+
{createdAt.toLocaleString(DateTime.DATETIME_MED_WITH_SECONDS)}
99+
</Text>
104100
)
105101
}
106102

packages/frontend/src/components/ExecutionRow/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export default function ExecutionRow(props: ExecutionRowProps): ReactElement {
3232
const { flow, executionSteps } = execution
3333

3434
const createdAt = DateTime.fromMillis(parseInt(execution.createdAt, 10))
35-
const relativeCreatedAt = createdAt.toRelative()
3635

3736
return (
3837
<Link
@@ -102,7 +101,7 @@ export default function ExecutionRow(props: ExecutionRowProps): ReactElement {
102101
color="base.content.medium"
103102
textStyle="body-2"
104103
>
105-
executed {relativeCreatedAt}
104+
{createdAt.toLocaleString(DateTime.DATETIME_MED_WITH_SECONDS)}
106105
</Text>
107106
</VStack>
108107
</GridItem>

0 commit comments

Comments
 (0)