Home Fun Games Blog CDCRIFD CDRD Utilities About Settings
Back to CerebralDatabank's Blog

Why 1/1/1970 bricks your iPhone

Really? Another extremely dangerous bug, Apple? Come on. It was probably an accident, but no one has this many accidents in a row. Remember when on a Mac you could type "root" as username with no password and hit "Enter" twice to gain root access? Remember the time when a Mac requested you for an admin username and password, it would show the actual password for the password hint? Remember when you could just ask Siri to open Photos (or any other app, including Settings) from the lock screen without entering the passcode?

Now, setting your iPhone's date to January 1st, 1970 renders it completely unbootable. If you restart it, it will show an Apple logo and stay there, even if you connect it to a computer with iTunes installed.

This is because dates are stored as 64-bit signed integers - the amount of seconds from January 1, 1970. This is called Unix time (see the current Unix time). The minimum value for Unix time is obviously 0 (00:00:00 UTC on Jan 1, 1970). Somewhere in the code that runs when iOS boots is a check for a date before the current date. If the current date is 0 (Unix timestamp ), then the system reverts to the maximum value. To make this clearer, imagine a hypothetical Unix-time-like x-bit system that can store 10 possible values, 0 to 9. If right now was 3 seconds, ticking back would result in 3, 2, 1, 0, 9, 8, 7, etc. (9 is the maximum value possible for the x-bit system). In the case of Unix time, the maximum time possible is much, much older than the age of the universe! This obviously prevents a successful boot.

Lesson of the story: Don't do random things like setting your date to a time in 1970. You might turn your phone into a shiny doorstop brick with questionable value.