라이브 예약 표시를 UTC 기준으로 변경
This commit is contained in:
@@ -85,7 +85,10 @@ struct LiveReservationCancelView: View {
|
||||
.cornerRadius(4.7)
|
||||
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(item.beginDateTime)
|
||||
let beginDateText = item.beginDateTimeUtc
|
||||
.parseUtcIsoDate()?
|
||||
.convertDateFormat(dateFormat: "yyyy.MM.dd EEE hh:mm a") ?? item.beginDateTimeUtc
|
||||
Text(beginDateText)
|
||||
.font(.custom(Font.medium.rawValue, size: 9.3))
|
||||
.foregroundColor(Color(hex: "ffd300"))
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ struct GetLiveReservationResponse: Decodable, Hashable {
|
||||
let coverImageUrl: String
|
||||
let price: Int
|
||||
let masterNickname: String
|
||||
let beginDateTime: String
|
||||
let beginDateTimeUtc: String
|
||||
let cancelable: Bool
|
||||
}
|
||||
|
||||
@@ -29,7 +29,10 @@ struct LiveReservationStatusItemView: View {
|
||||
.cornerRadius(4.7)
|
||||
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(item.beginDateTime)
|
||||
let beginDateText = item.beginDateTimeUtc
|
||||
.parseUtcIsoDate()?
|
||||
.convertDateFormat(dateFormat: "yyyy.MM.dd EEE hh:mm a") ?? item.beginDateTimeUtc
|
||||
Text(beginDateText)
|
||||
.font(.custom(Font.medium.rawValue, size: 9.3))
|
||||
.foregroundColor(Color(hex: "ffd300"))
|
||||
|
||||
@@ -102,7 +105,7 @@ struct LiveReservationStatusItemView_Previews: PreviewProvider {
|
||||
coverImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
|
||||
price: 0,
|
||||
masterNickname: "사냥꾼1004",
|
||||
beginDateTime: "2021.05.20 SUN 10p.m",
|
||||
beginDateTimeUtc: "2021-05-20T22:00:00",
|
||||
cancelable: false
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user