From c0e1cc06e0c67cb4a941889a3d63d312d1fb8fce Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 8 Dec 2025 03:02:42 +0000 Subject: (최겸) 구매 입찰계약 수정, 입찰기간수정 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bidding/manage/bidding-schedule-editor.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'components') 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}` } -- cgit v1.2.3