The Varying Date.distantFuture
An
NSDate
object representing a date in the distant future (in terms of centuries).
Date.distantFuture
is fixed at “January 1, 4001 at 12:00:00 AM GMT” - that means itstimeIntervalSince1970
(currently at 64,092,211,200) will change over time because of leap seconds.Date/time will always be hard, unless the Earth stops moving.
In other words, even within the same run (not to mention when unarchiving), you can’t rely on two distant future dates being equal. So don’t use it as a sentinel value.
I think
timeIntervalSinceReferenceDate
(and1970
) works differently: It does not take leap seconds into account. Each day ends at an exact multiple of 86400. That means that a giventimeInterval
might point to one (normal), two or zero points in time (at leap seconds).
Update (2019-11-02): The value can also vary between OS releases.