Skip to content

Commit efa7dfb

Browse files
committed
fix: remove date fns utcToZonedTime
1 parent c40a48c commit efa7dfb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/velog-web/src/hooks/useTimeFormat.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import formatDistanceToNow from 'date-fns/formatDistanceToNow'
44
import format from 'date-fns/format'
55
import koLocale from 'date-fns/locale/ko'
6-
import { utcToZonedTime } from 'date-fns-tz'
76
import { useEffect, useState } from 'react'
87

98
export function useTimeFormat(date: string) {
@@ -13,8 +12,8 @@ export function useTimeFormat(date: string) {
1312
useEffect(() => {
1413
setLoading(true)
1514

16-
const targetDate = utcToZonedTime(new Date(date), 'Asia/Seoul')
17-
const now = utcToZonedTime(new Date(), 'Asia/Seoul')
15+
const targetDate = new Date(date)
16+
const now = new Date()
1817
const diff = now.getTime() - targetDate.getTime()
1918

2019
const getTimeDescription = () => {

0 commit comments

Comments
 (0)