File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,16 +316,23 @@ const handleLike = async () => {
316316};
317317
318318const formatDate = (dateString : string ) => {
319+ // 스톡홀름(UTC+1)에서 한국(UTC+9)으로 변환 (8시간 차이)
319320 const date = new Date (dateString );
321+ const stockholmToKoreaTime = new Date (date .getTime () + (8 * 60 * 60 * 1000 ));
320322
321- return date . toLocaleDateString ( ' ko-KR ' , {
323+ const options : Intl . DateTimeFormatOptions = {
322324 year: ' numeric' ,
323325 month: ' long' ,
324326 day: ' numeric' ,
325327 hour: ' 2-digit' ,
326328 minute: ' 2-digit' ,
327- hour12: true // 12시간 형식 사용
328- }).replace (' AM' , ' 오전' ).replace (' PM' , ' 오후' );
329+ hour12: true
330+ };
331+
332+ return new Intl .DateTimeFormat (' ko-KR' , options )
333+ .format (stockholmToKoreaTime )
334+ .replace (' AM' , ' 오전' )
335+ .replace (' PM' , ' 오후' );
329336}
330337
331338const formatDiscipline = (discipline : ScienceDisciplineType ) => {
You can’t perform that action at this time.
0 commit comments