# How to kill iphone in 30 seconds

Back in the 1970s, programmers chose a simple and convenient method for storing time in operating systems - using an integer in the calculations (instead of uncomfortable days, minutes, seconds), which would show how many seconds have passed since a certain date. And this date was chosen on January 1, 1970. This method is still applied, as a result of which errors can sometimes occur. As, for example, in the original version of the game “Civilization”, when Gandhi turned out to be a bastard and declared war on everyone due to a decrease in the level of aggression to values ​​below 0, when the level of aggression was scrolled and sharply became maximum.

And if in 4 bits the maximum number written in the binary system is 15:

0000 - 0,
0001 - 1,
0010 - 2,
0011 - 3,
............,
1111 - 15.

And after 15, the value scrolls as a result of the overflow of the integer and again occurs 0.

Then in the 64-bit version of the OS it is 18.446.744.073.709.551.615 (when using 20 decimal digits) and -9.223.372.036.854.775. 808 or +9.223.372.036.854.775.807 when using 19 decimal digits. And it would seem that an error with the overflow of the whole or undercompletion is hardly possible. The range is quite large and allows you to operate with huge values.

But what will happen if, on a 64-bit OS of the Iphone phone, which uses the same principles of time accounting, set the time close to January 1, 1970?

That's right, there will be a rather entertaining video: “How to kill an Iphone in 30 seconds”, which I was surprised to find recently on the Internet and which has already gained millions of views:

Subsequently, a solution was found and even a little told about the reasons:

The Internet says that one of the possible checks of the system (calculating the time of the last call or battery operation) is most likely to blame, which results in a time earlier than January 1, 1970, and not just negative, but with a value an order of magnitude higher the expected life time of our Universe, with the display of which the program, of course, has problems.