IPhone – Why everything counts from year 1970

iphonejailbreakplisttime

So I've looked around and couldn't really find an answer to this.

I have an iPhone (jailbroke) and I notice in several settings there is a string usually in the .plist files that say something similar to "TimeIntervalSince1970". Now I know that all timers such as these need a base date and time to start with.

But my real question is why 1970?

Best Answer

Not everything counts from 1970. Its the standard time of Unix.

Unix time, or POSIX time, is a system for describing points in time, defined as the number of seconds elapsed since midnight proleptic Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds.

Unix Time

Early versions of unix measured system time in 1/60 s intervals. This meant that a 32-bit unsigned integer could only represent a span of time less than 829 days. For this reason, the time represented by the number 0 (called the epoch) had to be set in the very recent past. As this was in the early 1970s, the epoch was set to 1971-1-1.

Later, the system time was changed to increment every second, which increased the span of time that could be represented by a 32-bit unsigned integer to around 136 years. As it was no longer so important to squeeze every second out of the counter, the epoch was rounded down to the nearest decade, thus becoming 1970-1-1. One must assume that this was considered a bit neater than 1971-1-1.

Note that a 32-bit signed integer using 1970-1-1 as its epoch can represent dates up to 2038-1-19, on which date it will wrap around to 1901-12-13.

Why is 1/1/1970 the “epoch time”?