marcoarment/FCModel — pull request #32 by neilpa (2014-03-11 01:29:21+00:00)
Title: NSDate overflow for 32-bit NSInteger's

Ran into this problem recently for "large" dates. Internally FCModel was casting the double returned from `-timeIntervalSince1970` to an `NSInteger` which could be 32 or 64 bits.

Some fun debugger commands on a 32 bit device illustrates the problem
```
(lldb) po [NSDate distantFuture]
4001-01-01 00:00:00 +0000
(lldb) p (double)[[NSDate distantFuture] timeIntervalSince1970]
(double) $12 = 64092211200
(lldb) po [NSNumber numberWithInteger:(double)[[NSDate distantFuture] timeIntervalSince1970]]
-2147483648
```

I've gone with the easy fix of switching to `-numberWithLongLong` rather than the architecture dependent `-numberWithInteger`.