diff --git a/src/utils/format.ts b/src/utils/format.ts index c7f156d3..521618be 100644 --- a/src/utils/format.ts +++ b/src/utils/format.ts @@ -1,6 +1,6 @@ import { isValid } from "date-fns"; import { ja } from "date-fns/locale"; -import { format as formatFn, utcToZonedTime } from "date-fns-tz"; +import { format as formatFn, toZonedTime } from "date-fns-tz"; const timeZone = "Asia/Tokyo"; @@ -10,7 +10,7 @@ const timeZone = "Asia/Tokyo"; * see https://date-fns.org/v2.29.3/docs/format */ export const formatDateTime = (value: string, format: string): string => { - const parsedDate = utcToZonedTime(value, timeZone); + const parsedDate = toZonedTime(value, timeZone); if (!isValid(parsedDate)) return "";