라이브 예약 Response에 utc 시간 변수 beginDateTimeUtc 추가 #381

Merged
klaus merged 1 commits from test into main 2026-01-21 07:54:06 +00:00
2 changed files with 7 additions and 0 deletions

View File

@@ -8,5 +8,6 @@ data class GetLiveReservationResponse(
val price: Int, val price: Int,
val masterNickname: String, val masterNickname: String,
val beginDateTime: String, val beginDateTime: String,
val beginDateTimeUtc: String,
val cancelable: Boolean val cancelable: Boolean
) )

View File

@@ -122,6 +122,9 @@ class LiveReservationService(
beginDateTime = beginDateTime.format( beginDateTime = beginDateTime.format(
DateTimeFormatter.ofPattern(detailDateFormat) DateTimeFormatter.ofPattern(detailDateFormat)
), ),
beginDateTimeUtc = it.room!!.beginDateTime
.atZone(ZoneId.of("UTC"))
.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME),
cancelable = beginDateTime.minusHours(4).isAfter( cancelable = beginDateTime.minusHours(4).isAfter(
LocalDateTime.now() LocalDateTime.now()
.atZone(ZoneId.of("UTC")) .atZone(ZoneId.of("UTC"))
@@ -158,6 +161,9 @@ class LiveReservationService(
beginDateTime = beginDateTime.format( beginDateTime = beginDateTime.format(
DateTimeFormatter.ofPattern(detailDateFormat) DateTimeFormatter.ofPattern(detailDateFormat)
), ),
beginDateTimeUtc = reservation.room!!.beginDateTime
.atZone(ZoneId.of("UTC"))
.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME),
cancelable = beginDateTime.minusHours(4).isAfter( cancelable = beginDateTime.minusHours(4).isAfter(
LocalDateTime.now() LocalDateTime.now()
.atZone(ZoneId.of("UTC")) .atZone(ZoneId.of("UTC"))