Client: Date time zones now handled correctly

This commit is contained in:
Donkie
2023-05-18 13:38:38 +02:00
parent 60ea450ce2
commit 646ade1721
7 changed files with 70 additions and 10 deletions

View File

@@ -8,6 +8,10 @@ import {
DateField,
} from "@refinedev/antd";
import { Table, Space } from "antd";
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
dayjs.extend(utc);
export const VendorList: React.FC<IResourceComponentsProps> = () => {
const { tableProps } = useTable({
@@ -23,7 +27,11 @@ export const VendorList: React.FC<IResourceComponentsProps> = () => {
dataIndex={["registered"]}
title="Registered"
render={(value) => (
<DateField value={value} format="YYYY-MM-DD HH:mm:ss" />
<DateField
value={dayjs.utc(value).local()}
title={dayjs.utc(value).local().format()}
format="YYYY-MM-DD HH:mm:ss"
/>
)}
/>
<Table.Column dataIndex={["comment"]} title="Comment" />