fix(logs): time crap

This commit is contained in:
2025-07-08 17:28:11 -05:00
parent 7a4dea9d87
commit e13b5a4283

View File

@@ -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 (
<div className="text-left font-medium">{correctDate}</div>
<div className="text-left font-medium">{formattedDate}</div>
);
}
},