라이브 룸 일시 포맷에 다국어 설정 적용

LiveRoomService에서 하드코딩된 날짜 포맷과 Locale을 제거하고,

LangContext를 통해 클라이언트 언어 설정에 따른 포맷과 Locale을

사용하도록 수정한다.
This commit is contained in:
2026-01-20 19:32:18 +09:00
parent 482241f734
commit a41bfaa037

View File

@@ -70,7 +70,6 @@ import java.time.LocalDateTime
import java.time.ZoneId
import java.time.format.DateTimeFormatter
import java.util.Date
import java.util.Locale
import java.util.concurrent.locks.ReentrantReadWriteLock
import kotlin.concurrent.write
@@ -187,8 +186,8 @@ class LiveRoomService(
.withZoneSameInstant(ZoneId.of(timezone))
.format(
DateTimeFormatter
.ofPattern("yyyy년 MM월 dd일 (E) a hh시 mm분")
.withLocale(Locale.KOREAN)
.ofPattern(messageSource.getMessage("live.room.datetime_format", langContext.lang).orEmpty())
.withLocale(langContext.lang.locale)
)
val beginDateTimeUtc = it.beginDateTime
@@ -436,7 +435,11 @@ class LiveRoomService(
val beginDateTime = room.beginDateTime
.atZone(ZoneId.of("UTC"))
.withZoneSameInstant(ZoneId.of(timezone))
.format(DateTimeFormatter.ofPattern("yyyy.MM.dd E hh:mm a"))
.format(
DateTimeFormatter
.ofPattern(messageSource.getMessage("live.room.datetime_format_detail", langContext.lang).orEmpty())
.withLocale(langContext.lang.locale)
)
val beginDateTimeUtc = room.beginDateTime
.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)