summaryrefslogtreecommitdiff
path: root/components/bidding/manage/bidding-schedule-editor.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'components/bidding/manage/bidding-schedule-editor.tsx')
-rw-r--r--components/bidding/manage/bidding-schedule-editor.tsx15
1 files changed, 12 insertions, 3 deletions
diff --git a/components/bidding/manage/bidding-schedule-editor.tsx b/components/bidding/manage/bidding-schedule-editor.tsx
index ca4643ff..4ddaee08 100644
--- a/components/bidding/manage/bidding-schedule-editor.tsx
+++ b/components/bidding/manage/bidding-schedule-editor.tsx
@@ -140,6 +140,15 @@ export function BiddingScheduleEditor({ biddingId, readonly = false }: BiddingSc
return round > 1
}
+ // UTC 날짜를 한국 시간(KST) 기준 datetime-local 입력값으로 변환
+ const toKstInputValue = (date: string | Date | undefined | null) => {
+ if (!date) return ''
+ const d = new Date(date)
+ // UTC 시간에 9시간을 더함
+ const kstTime = d.getTime() + (9 * 60 * 60 * 1000)
+ return new Date(kstTime).toISOString().slice(0, 16)
+ }
+
// 데이터 로딩
React.useEffect(() => {
const loadSchedule = async () => {
@@ -156,8 +165,8 @@ export function BiddingScheduleEditor({ biddingId, readonly = false }: BiddingSc
})
setSchedule({
- submissionStartDate: bidding.submissionStartDate ? new Date(bidding.submissionStartDate).toISOString().slice(0, 16) : '',
- submissionEndDate: bidding.submissionEndDate ? new Date(bidding.submissionEndDate).toISOString().slice(0, 16) : '',
+ submissionStartDate: toKstInputValue(bidding.submissionStartDate),
+ submissionEndDate: toKstInputValue(bidding.submissionEndDate),
remarks: bidding.remarks || '',
isUrgent: bidding.isUrgent || false,
hasSpecificationMeeting: bidding.hasSpecificationMeeting || false,
@@ -170,7 +179,7 @@ export function BiddingScheduleEditor({ biddingId, readonly = false }: BiddingSc
if (meetingDetails.success && meetingDetails.data) {
const meeting = meetingDetails.data
setSpecMeetingInfo({
- meetingDate: meeting.meetingDate ? new Date(meeting.meetingDate).toISOString().slice(0, 16) : '',
+ meetingDate: toKstInputValue(meeting.meetingDate),
meetingTime: meeting.meetingTime || '',
location: meeting.location || '',
address: meeting.address || '',