라이브 예약 Response에 utc 시간 변수 beginDateTimeUtc 추가
This commit is contained in:
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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"))
|
||||||
|
|||||||
Reference in New Issue
Block a user