From 5b109226e6fe029ec59c0a9402095ee8d51147d7 Mon Sep 17 00:00:00 2001 From: Collin Duncan <3679940+cgduncan7@users.noreply.github.com> Date: Thu, 3 Apr 2025 16:01:34 +0200 Subject: [PATCH] Changing the DayjsTransformer to transform from plain date string to dayjs in correct timezone --- src/common/dayjs.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/dayjs.ts b/src/common/dayjs.ts index 3a8a6cd..bb4b831 100644 --- a/src/common/dayjs.ts +++ b/src/common/dayjs.ts @@ -45,7 +45,7 @@ const dayjsTz = ( export const DayjsTransformer = ({ value, type }: TransformFnParams) => { switch (type) { case TransformationType.PLAIN_TO_CLASS: - return dayjs(value) + return dayjsTz(value) case TransformationType.CLASS_TO_PLAIN: return value.format() default: @@ -55,7 +55,7 @@ export const DayjsTransformer = ({ value, type }: TransformFnParams) => { export const DayjsColumnTransformer = { to: (value: dayjs.Dayjs) => value.format(), - from: (value: Date) => dayjs(value), + from: (value: Date) => dayjsTz(value), } export default dayjsTz