fix(logs): time crap
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { fixTime } from "@/utils/fixTime";
|
|
||||||
import { ColumnDef } from "@tanstack/react-table";
|
import { ColumnDef } from "@tanstack/react-table";
|
||||||
|
import { format } from "date-fns-tz";
|
||||||
import { Trash } from "lucide-react";
|
import { Trash } from "lucide-react";
|
||||||
|
|
||||||
// This type is used to define the shape of our data.
|
// This type is used to define the shape of our data.
|
||||||
@@ -38,9 +38,11 @@ export const ocpColumns = (
|
|||||||
header: "Error Date",
|
header: "Error Date",
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
if (row.getValue("created_at")) {
|
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 (
|
return (
|
||||||
<div className="text-left font-medium">{correctDate}</div>
|
<div className="text-left font-medium">{formattedDate}</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user