Skip to content

Commit 201d860

Browse files
committed
Update BoardDetail.vue
1 parent 455678f commit 201d860

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

sciq-fe/src/pages/Board/BoardDetail.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,16 +316,23 @@ const handleLike = async () => {
316316
};
317317
318318
const 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
331338
const formatDiscipline = (discipline: ScienceDisciplineType) => {

0 commit comments

Comments
 (0)