라이브 예약 표시를 UTC 기준으로 변경

This commit is contained in:
Yu Sung
2026-01-21 17:27:26 +09:00
parent a743fecfdd
commit 9223e26a07
16 changed files with 37 additions and 52 deletions

View File

@@ -203,20 +203,17 @@ final class UserProfileViewModel: ObservableObject {
}
self.isShowPasswordDialog = true
} else {
let fromFormatter = DateFormatter()
fromFormatter.dateFormat = "yyyy.MM.dd EEE hh:mm a"
fromFormatter.locale = Locale(identifier: "en_US_POSIX")
let beginDate = fromFormatter.date(from: $0.beginDateTime)!
let now = Date()
let timeInterval = now.timeIntervalSince(beginDate)
let hours = Int(timeInterval / 3600)
let minutes = Int((timeInterval.truncatingRemainder(dividingBy: 3600)) / 60)
if hours >= 1 {
self.liveStartDate = beginDate.convertDateFormat(dateFormat: "yyyy-MM-dd, HH:mm")
self.nowDate = now.convertDateFormat(dateFormat: "yyyy-MM-dd, HH:mm")
self.paymentDialogDesc2 = I18n.MemberChannel.elapsedLiveWarning(hours: hours, minutes: minutes)
if let beginDate = $0.beginDateTimeUtc.parseUtcIsoDate() {
let now = Date()
let timeInterval = now.timeIntervalSince(beginDate)
let hours = Int(timeInterval / 3600)
let minutes = Int((timeInterval.truncatingRemainder(dividingBy: 3600)) / 60)
if hours >= 1 {
self.liveStartDate = beginDate.convertDateFormat(dateFormat: "yyyy-MM-dd, HH:mm")
self.nowDate = now.convertDateFormat(dateFormat: "yyyy-MM-dd, HH:mm")
self.paymentDialogDesc2 = I18n.MemberChannel.elapsedLiveWarning(hours: hours, minutes: minutes)
}
}
self.paymentDialogTitle = I18n.MemberChannel.paidLiveEnterTitle