refactor(time): more time changes to fix 24 hour format

This commit is contained in:
2025-04-24 21:25:56 -05:00
parent 1b90129516
commit 3cb7fd2e1b
3 changed files with 4 additions and 7 deletions

View File

@@ -16,6 +16,6 @@ export const fixTime = (date: any) => {
return format(
addHours(rawDate, offsetHours).toISOString(),
"MM/dd/yyyy hh:mm"
"MM/dd/yyyy HH:mm"
);
};

View File

@@ -1,5 +1,5 @@
import { ColumnDef } from "@tanstack/react-table";
import { format } from "date-fns";
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.
@@ -35,7 +35,7 @@ export const columns: ColumnDef<Adjustmnets>[] = [
if (row.getValue("ProductionDate")) {
const correctDate = format(
row.getValue("ProductionDate"),
"M/d/yyyy hh:mm"
"M/d/yyyy HH:mm"
);
return (
<div className="text-left font-medium">{correctDate}</div>

View File

@@ -36,10 +36,7 @@ export const labelolumns: ColumnDef<Adjustmnets>[] = [
if (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"
);
const formattedDate = format(strippedDate, "MM/dd/yyyy HH:mm");
return (
<div className="text-left font-medium">{formattedDate}</div>
);