diff options
Diffstat (limited to 'components/bidding')
| -rw-r--r-- | components/bidding/manage/bidding-schedule-editor.tsx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/components/bidding/manage/bidding-schedule-editor.tsx b/components/bidding/manage/bidding-schedule-editor.tsx index 32ce6940..72961c3d 100644 --- a/components/bidding/manage/bidding-schedule-editor.tsx +++ b/components/bidding/manage/bidding-schedule-editor.tsx @@ -151,15 +151,18 @@ export function BiddingScheduleEditor({ biddingId, readonly = false }: BiddingSc return new Date(kstTime).toISOString().slice(0, 16) } - // timestamp에서 시간(HH:MM) 추출 (KST 기준) + // timestamp에서 시간(HH:MM) 추출 + // 수정: Backend에서 setUTCHours로 저장했으므로, 읽을 때도 getUTCHours로 읽어야 + // 브라우저 타임존(KST)의 간섭 없이 원래 저장한 숫자를 가져올 수 있습니다. const extractTimeFromTimestamp = (date: string | Date | undefined | null): string => { if (!date) return '' const d = new Date(date) - // UTC 시간에 9시간을 더함 - const kstTime = d.getTime() + (9 * 60 * 60 * 1000) - const kstDate = new Date(kstTime) - const hours = kstDate.getUTCHours().toString().padStart(2, '0') - const minutes = kstDate.getUTCMinutes().toString().padStart(2, '0') + + // 중요: Backend에서 setUTCHours로 저장했으므로, 읽을 때도 getUTCHours로 읽어야 + // 브라우저 타임존(KST)의 간섭 없이 원래 저장한 숫자(09:00)를 가져올 수 있습니다. + const hours = d.getUTCHours().toString().padStart(2, '0') + const minutes = d.getUTCMinutes().toString().padStart(2, '0') + return `${hours}:${minutes}` } |
