Skip to content

Commit

Permalink
🔀 :: (#490) fix notification bug
Browse files Browse the repository at this point in the history
  • Loading branch information
BJCHO0501 authored May 13, 2023
2 parents 09f4747 + b66cbed commit 27898b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Modules/XDateUtil/Sources/DateFormat.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import Foundation

public enum DateFormat: String {
/// yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS
case fullDateWithMilliSecondTime = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS"
/// yyyy-MM-dd'T'HH:mm:ss
case fullDateWithTime = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS"
case fullDateWithTime = "yyyy-MM-dd'T'HH:mm:ss"
/// yyyy-MM-dd
case fullDate = "yyyy-MM-dd"
/// yyyy
Expand Down
1 change: 1 addition & 0 deletions Modules/XDateUtil/Sources/StringToDate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public extension String {
func toDate(format: DateFormat) -> Date {
XDateFormatter.shared.dateFormat = format.rawValue
guard let returnDate = XDateFormatter.shared.date(from: self) else {
print("toDate Error: Date로 format하려는 데이터의 형식이 DateFormat과 일치하지 않습니다.")
return Date()
}
return returnDate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LoaclTokenDataSourceImpl: LoaclTokenDataSource {
}

func fetchExpiredDate() -> Date? {
self.keychain.get(.expiredAt)?.toDate(format: .fullDateWithTime)
self.keychain.get(.expiredAt)?.toDate(format: .fullDateWithMilliSecondTime)
}

func resetToken() {
Expand Down

0 comments on commit 27898b8

Please sign in to comment.