We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c40a48c commit efa7dfbCopy full SHA for efa7dfb
packages/velog-web/src/hooks/useTimeFormat.ts
@@ -3,7 +3,6 @@
3
import formatDistanceToNow from 'date-fns/formatDistanceToNow'
4
import format from 'date-fns/format'
5
import koLocale from 'date-fns/locale/ko'
6
-import { utcToZonedTime } from 'date-fns-tz'
7
import { useEffect, useState } from 'react'
8
9
export function useTimeFormat(date: string) {
@@ -13,8 +12,8 @@ export function useTimeFormat(date: string) {
13
12
useEffect(() => {
14
setLoading(true)
15
16
- const targetDate = utcToZonedTime(new Date(date), 'Asia/Seoul')
17
- const now = utcToZonedTime(new Date(), 'Asia/Seoul')
+ const targetDate = new Date(date)
+ const now = new Date()
18
const diff = now.getTime() - targetDate.getTime()
19
20
const getTimeDescription = () => {
0 commit comments