Skip to content

Commit

Permalink
use locale time string
Browse files Browse the repository at this point in the history
  • Loading branch information
oxdev03 committed Apr 21, 2024
1 parent 4e931b3 commit 32e6aaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/dashboard/components/dashboard/DashboardLog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function DashboardLog({ refetchInterval, processIds }: DashboardL
{data?.length
? data?.map((log) => (
<Text key={log?._id} size="md" fw={600} c={logColor[log?.type || "info"]} component="pre" my="0px">
{log?.createdAt?.toISOString()?.split("T")[1].split(".")[0]} {log?.message}
{new Date(log?.createdAt || 0)?.toLocaleTimeString()} {log?.message}
</Text>
))
: "No logs"}
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/components/process/ProcessLog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function ProcessLog({ processId, refetchInterval }: ProcessAction
component="pre"
my="0px"
>
{log.createdAt.toISOString().split("T")[1].split(".")[0]} {log.message}
{new Date(log.createdAt)?.toLocaleTimeString()} {log.message}
</Text>
))}
{getLogs.error && <div>Error: {getLogs.error.message}</div>}
Expand Down

0 comments on commit 32e6aaa

Please sign in to comment.