fix(time): changes the labeling time to be our db version
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { fixTime } from "@/utils/fixTime";
|
||||
//import { fixTime } from "@/utils/fixTime";
|
||||
import { ColumnDef } from "@tanstack/react-table";
|
||||
import { format } from "date-fns-tz";
|
||||
|
||||
// This type is used to define the shape of our data.
|
||||
// You can use a Zod schema here if you want.
|
||||
@@ -33,9 +34,14 @@ export const labelolumns: ColumnDef<Adjustmnets>[] = [
|
||||
header: "Label Date",
|
||||
cell: ({ row }) => {
|
||||
if (row.getValue("upd_date")) {
|
||||
const correctDate = fixTime(row.getValue("upd_date"));
|
||||
const correctDate: any = row.getValue("upd_date");
|
||||
const strippedDate = correctDate.replace("Z", ""); // Remove Z
|
||||
const formattedDate = format(
|
||||
strippedDate,
|
||||
"MM/dd/yyyy hh:mm a"
|
||||
);
|
||||
return (
|
||||
<div className="text-left font-medium">{correctDate}</div>
|
||||
<div className="text-left font-medium">{formattedDate}</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user