Skip to content

Commit

Permalink
Fix error for old devices.
Browse files Browse the repository at this point in the history
  • Loading branch information
rehannali committed Nov 3, 2023
1 parent 8456cc5 commit 788f1d9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ public struct MilliSecondsToDate: SGTranformable {
public typealias ToType = Date

public static func transform(from value: TimeInterval?) -> Date? {
guard let value else { return nil }
guard let value = value else { return nil }
return Date(timeIntervalSince1970: value / 1000)
}

public static func transform(from value: Date?) -> TimeInterval? {
guard let value else { return nil }
guard let value = value else { return nil }
return value.timeIntervalSince1970 * 1000
}
}

0 comments on commit 788f1d9

Please sign in to comment.