I have a Dictionary
object containing a large number (epoch time). When I try to cast it as an Int
the result is an entirely different number. Trying to explicitly cast it as an Int64
or String
both yield nil
.
(lldb) po postData["createdDate"]
▿ Optional<AnyObject>
▿ Some : 1 elements
- [0] : 1461681488000
(lldb) po postData["createdDate"] as? [Int]
▿ Optional<Array<Int>>
▿ Some : 1 elements
- [0] : 1392607360
(lldb) po postData["createdDate"] as? [Int64]
nil
(lldb) po postData["createdDate"] as? [String]
nil
I'm on a 64 bit system and am well below the ceiling for an Int64
. What's going on here, and how do I access this number?
PS: I'm aware dates should be transmitted in ISO 8601 format but this is the input I'm dealing with.