From 0d290a9d2c52d384927117e07e4e42b2dc931e11 Mon Sep 17 00:00:00 2001 From: nakyong82 Date: Thu, 5 Dec 2024 11:52:52 +0900 Subject: [PATCH] =?UTF-8?q?fix(#208):=20api=20=EC=9D=91=EB=8B=B5=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=98=A8=20=EC=8B=9C=EA=B0=84=EA=B3=BC=20=ED=8C=8C?= =?UTF-8?q?=EC=8B=B1=ED=95=9C=20=EC=8B=9C=EA=B0=84=EC=9D=B4=20=EC=95=88=20?= =?UTF-8?q?=EB=A7=9E=EB=8A=94=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/frontend/src/shared/common/component/Time.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/frontend/src/shared/common/component/Time.tsx b/apps/frontend/src/shared/common/component/Time.tsx index c2b3f4b1..71e742a6 100644 --- a/apps/frontend/src/shared/common/component/Time.tsx +++ b/apps/frontend/src/shared/common/component/Time.tsx @@ -2,10 +2,12 @@ import { Slot, SlotComponentProps } from '@froxy/design/components'; import { cn } from '@froxy/design/utils'; export const formatDate = { - day: (date: Date, locales: Intl.LocalesArgument) => date.toLocaleDateString(locales, { weekday: 'long' }), - 'YYYY.MM.DD.': (date: Date, locales: Intl.LocalesArgument) => date.toLocaleDateString(locales).split('T')[0], + day: (date: Date, locales: Intl.LocalesArgument) => + date.toLocaleDateString(locales, { weekday: 'long', timeZone: 'UCT' }), + 'YYYY.MM.DD.': (date: Date, locales: Intl.LocalesArgument) => + date.toLocaleDateString(locales, { timeZone: 'UTC' }).split('T')[0], 'YYYY-MM-DD': (date: Date, locales: Intl.LocalesArgument) => - date.toLocaleDateString(locales).slice(0, 11).replaceAll('. ', '-') + date.toLocaleDateString(locales, { timeZone: 'UTC' }).replaceAll('.', '-').slice(0, 11).replaceAll(' ', '') } as const; export type FormatDateKey = keyof typeof formatDate;