1+ import { KOREA_TIME_ZONE } from "@frontend/common/utils" ;
12import NorthEastRoundedIcon from "@mui/icons-material/NorthEastRounded" ;
23import { Box , Button , Stack , Typography } from "@mui/material" ;
34import { DateTime } from "luxon" ;
@@ -105,7 +106,8 @@ const SessionCard: FC<{ placement: TimetablePlacement; color: string }> = ({ pla
105106 whiteSpace : "nowrap" ,
106107 } }
107108 >
108- { DateTime . fromMillis ( placement . startMs ) . toFormat ( "HH:mm" ) } –{ DateTime . fromMillis ( placement . endMs ) . toFormat ( "HH:mm" ) }
109+ { DateTime . fromMillis ( placement . startMs , { zone : KOREA_TIME_ZONE } ) . toFormat ( "HH:mm" ) } –
110+ { DateTime . fromMillis ( placement . endMs , { zone : KOREA_TIME_ZONE } ) . toFormat ( "HH:mm" ) }
109111 </ Typography >
110112 < Typography
111113 title = { placement . title }
@@ -149,7 +151,7 @@ export const MyTimetableGrid: FC<{ placements: TimetablePlacement[] }> = ({ plac
149151 const placementsByDay = useMemo ( ( ) => {
150152 const grouped = new Map < string , TimetablePlacement [ ] > ( ) ;
151153 placements . forEach ( ( placement ) => {
152- const day = DateTime . fromMillis ( placement . startMs ) . toISODate ( ) ?? "" ;
154+ const day = DateTime . fromMillis ( placement . startMs , { zone : KOREA_TIME_ZONE } ) . toISODate ( ) ?? "" ;
153155 grouped . set ( day , [ ...( grouped . get ( day ) ?? [ ] ) , placement ] ) ;
154156 } ) ;
155157 return grouped ;
@@ -161,10 +163,10 @@ export const MyTimetableGrid: FC<{ placements: TimetablePlacement[] }> = ({ plac
161163 const dayPlacements = placementsByDay . get ( activeDay ) ?? [ ] ;
162164 const morningPrograms = FIXED_MORNING [ activeDay ] ;
163165 const afternoonPrograms = FIXED_AFTERNOON [ activeDay ] ;
164- const dayStartMs = DateTime . fromISO ( activeDay )
166+ const dayStartMs = DateTime . fromISO ( activeDay , { zone : KOREA_TIME_ZONE } )
165167 . set ( { hour : AFTERNOON_START_HOUR , minute : AFTERNOON_START_MINUTE , second : 0 , millisecond : 0 } )
166168 . toMillis ( ) ;
167- const dayEndMs = DateTime . fromISO ( `${ activeDay } T${ afternoonPrograms . at ( - 1 ) ?. end } :00` ) . toMillis ( ) ;
169+ const dayEndMs = DateTime . fromISO ( `${ activeDay } T${ afternoonPrograms . at ( - 1 ) ?. end } :00` , { zone : KOREA_TIME_ZONE } ) . toMillis ( ) ;
168170 const timeSlots = Array . from ( { length : ( dayEndMs - dayStartMs ) / SLOT_MS } , ( _ , index ) => dayStartMs + index * SLOT_MS ) ;
169171
170172 const selectDay = ( day : string ) =>
@@ -188,6 +190,10 @@ export const MyTimetableGrid: FC<{ placements: TimetablePlacement[] }> = ({ plac
188190 sx = { { alignSelf : "flex-end" , fontWeight : 700 , whiteSpace : "nowrap" } }
189191 children = { isKo ? "발표 추가" : "Add session" }
190192 />
193+ < Typography
194+ sx = { { alignSelf : "flex-end" , color : "text.secondary" , fontSize : { xs : "0.68rem" , sm : "0.75rem" } , textAlign : "right" } }
195+ children = { isKo ? "모든 시간은 한국 표준시(KST) 기준입니다." : "All times are shown in Korea Standard Time (KST)." }
196+ />
191197
192198 < Box sx = { { width : "100%" , minWidth : 0 , overflow : "hidden" , border : "1px solid" , borderColor : "divider" , borderRadius : "0.75rem" } } >
193199 < Stack direction = "row" spacing = { 0 } sx = { { borderBottom : "1px solid" , borderColor : "divider" } } >
@@ -212,7 +218,7 @@ export const MyTimetableGrid: FC<{ placements: TimetablePlacement[] }> = ({ plac
212218 whiteSpace : "nowrap" ,
213219 "&:hover" : { backgroundColor : day === activeDay ? "primary.main" : "action.hover" } ,
214220 } }
215- children = { `Day ${ index + 1 } · ${ DateTime . fromISO ( day ) . toFormat ( "M.d" ) } ` }
221+ children = { `Day ${ index + 1 } · ${ DateTime . fromISO ( day , { zone : KOREA_TIME_ZONE } ) . toFormat ( "M.d" ) } ` }
216222 />
217223 ) ) }
218224 </ Stack >
@@ -331,7 +337,7 @@ export const MyTimetableGrid: FC<{ placements: TimetablePlacement[] }> = ({ plac
331337 } }
332338 >
333339 < Typography sx = { { color : "text.secondary" , fontSize : { xs : "0.55rem" , sm : "0.68rem" } , fontWeight : 700 , lineHeight : 1 } } >
334- { DateTime . fromMillis ( time ) . toFormat ( "H:mm" ) }
340+ { DateTime . fromMillis ( time , { zone : KOREA_TIME_ZONE } ) . toFormat ( "H:mm" ) }
335341 </ Typography >
336342 </ Stack >
337343 ) ) }
@@ -353,8 +359,12 @@ export const MyTimetableGrid: FC<{ placements: TimetablePlacement[] }> = ({ plac
353359 ) ) }
354360
355361 { afternoonPrograms . map ( ( program ) => {
356- const startSlot = Math . round ( ( DateTime . fromISO ( `${ activeDay } T${ program . start } :00` ) . toMillis ( ) - dayStartMs ) / SLOT_MS ) ;
357- const endSlot = Math . round ( ( DateTime . fromISO ( `${ activeDay } T${ program . end } :00` ) . toMillis ( ) - dayStartMs ) / SLOT_MS ) ;
362+ const startSlot = Math . round (
363+ ( DateTime . fromISO ( `${ activeDay } T${ program . start } :00` , { zone : KOREA_TIME_ZONE } ) . toMillis ( ) - dayStartMs ) / SLOT_MS
364+ ) ;
365+ const endSlot = Math . round (
366+ ( DateTime . fromISO ( `${ activeDay } T${ program . end } :00` , { zone : KOREA_TIME_ZONE } ) . toMillis ( ) - dayStartMs ) / SLOT_MS
367+ ) ;
358368 return (
359369 < Stack
360370 key = { `${ program . start } -${ program . end } ` }
0 commit comments