Merge pull request 'test' (#370) from test into main

Reviewed-on: #370
This commit is contained in:
2025-12-31 11:01:28 +00:00
2 changed files with 9 additions and 13 deletions

View File

@@ -70,6 +70,7 @@ 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
@@ -181,16 +182,13 @@ class LiveRoomService(
}
}
val beginDateTimeFormat = messageSource
.getMessage("live.room.datetime_format", langContext.lang)
.orEmpty()
val beginDateTime = it.beginDateTime
.atZone(ZoneId.of("UTC"))
.withZoneSameInstant(ZoneId.of(timezone))
.format(
DateTimeFormatter
.ofPattern(beginDateTimeFormat)
.withLocale(langContext.lang.locale)
.ofPattern("yyyy년 MM월 dd일 (E) a hh시 mm분")
.withLocale(Locale.KOREAN)
)
val beginDateTimeUtc = it.beginDateTime
@@ -450,17 +448,13 @@ class LiveRoomService(
throw SodaException(messageKey = "live.room.adult_verification_required")
}
val detailDateTimeFormat = messageSource
.getMessage("live.room.datetime_format_detail", langContext.lang)
.orEmpty()
val beginDateTime = room.beginDateTime
.atZone(ZoneId.of("UTC"))
.withZoneSameInstant(ZoneId.of(timezone))
.format(
DateTimeFormatter
.ofPattern(detailDateTimeFormat)
.withLocale(langContext.lang.locale)
)
.format(DateTimeFormatter.ofPattern("yyyy.MM.dd E hh:mm a"))
val beginDateTimeUtc = room.beginDateTime
.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
val response = GetRoomDetailResponse(
roomId = roomId,
@@ -472,6 +466,7 @@ class LiveRoomService(
numberOfParticipants = 0,
channelName = room.channelName,
beginDateTime = beginDateTime,
beginDateTimeUtc = beginDateTimeUtc,
isPaid = false,
isAdult = room.isAdult,
isPrivateRoom = room.type == LiveRoomType.PRIVATE,

View File

@@ -15,6 +15,7 @@ data class GetRoomDetailResponse(
val tags: List<String>,
val channelName: String?,
val beginDateTime: String,
val beginDateTimeUtc: String,
var numberOfParticipants: Int,
val numberOfParticipantsTotal: Int
) {