라이브 예약 Response에 utc 시간 변수 beginDateTimeUtc 추가 #381
@@ -8,5 +8,6 @@ data class GetLiveReservationResponse(
|
||||
val price: Int,
|
||||
val masterNickname: String,
|
||||
val beginDateTime: String,
|
||||
val beginDateTimeUtc: String,
|
||||
val cancelable: Boolean
|
||||
)
|
||||
|
||||
@@ -122,6 +122,9 @@ class LiveReservationService(
|
||||
beginDateTime = beginDateTime.format(
|
||||
DateTimeFormatter.ofPattern(detailDateFormat)
|
||||
),
|
||||
beginDateTimeUtc = it.room!!.beginDateTime
|
||||
.atZone(ZoneId.of("UTC"))
|
||||
.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME),
|
||||
cancelable = beginDateTime.minusHours(4).isAfter(
|
||||
LocalDateTime.now()
|
||||
.atZone(ZoneId.of("UTC"))
|
||||
@@ -158,6 +161,9 @@ class LiveReservationService(
|
||||
beginDateTime = beginDateTime.format(
|
||||
DateTimeFormatter.ofPattern(detailDateFormat)
|
||||
),
|
||||
beginDateTimeUtc = reservation.room!!.beginDateTime
|
||||
.atZone(ZoneId.of("UTC"))
|
||||
.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME),
|
||||
cancelable = beginDateTime.minusHours(4).isAfter(
|
||||
LocalDateTime.now()
|
||||
.atZone(ZoneId.of("UTC"))
|
||||
|
||||
Reference in New Issue
Block a user