From e13b5a42836f337607f2fc0fd359c3f8cfdf4443 Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Tue, 8 Jul 2025 17:28:11 -0500 Subject: [PATCH] fix(logs): time crap --- .../utils/tableData/production/ocpLogs/ocpLogColumns.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/utils/tableData/production/ocpLogs/ocpLogColumns.tsx b/frontend/src/utils/tableData/production/ocpLogs/ocpLogColumns.tsx index 9a265b6..b2a8587 100644 --- a/frontend/src/utils/tableData/production/ocpLogs/ocpLogColumns.tsx +++ b/frontend/src/utils/tableData/production/ocpLogs/ocpLogColumns.tsx @@ -1,6 +1,6 @@ import { Button } from "@/components/ui/button"; -import { fixTime } from "@/utils/fixTime"; import { ColumnDef } from "@tanstack/react-table"; +import { format } from "date-fns-tz"; import { Trash } from "lucide-react"; // This type is used to define the shape of our data. @@ -38,9 +38,11 @@ export const ocpColumns = ( header: "Error Date", cell: ({ row }) => { if (row.getValue("created_at")) { - const correctDate = fixTime(row.getValue("created_at")); + const correctDate: any = row.getValue("created_at"); + const strippedDate = correctDate.replace("Z", ""); // Remove Z + const formattedDate = format(strippedDate, "MM/dd/yyyy HH:mm"); return ( -
{correctDate}
+
{formattedDate}
); } },