diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-12-08 03:02:42 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-12-08 03:02:42 +0000 |
| commit | c0e1cc06e0c67cb4a941889a3d63d312d1fb8fce (patch) | |
| tree | 99dc529ed88d762808dc571d4095dc880e1bef02 /components/bidding/manage/bidding-schedule-editor.tsx | |
| parent | 4a8d125cf60254417d4e2ca75a967ff08cc8567e (diff) | |
(최겸) 구매 입찰계약 수정, 입찰기간수정
Diffstat (limited to 'components/bidding/manage/bidding-schedule-editor.tsx')
| -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}` } |
