Y2k38 Epochalypse

I’m listening to “Humble Pi” by Matt Parker about mathmatical & computational glitches and it mentions the Y2k38 bug. This is when a 32 bit processor will reach a binery count of 32 1’s and then reset to 32 0’s. 32 bit computers use Unix time, starting from 1 Jan 1970 as a start point and in January 2038 this is when there are 2 million milliseconds and the clocks all reset. So a Y2K issue that is based on a 32 bit processor restarting its count. This is a fact of a 32 bit processor, not a programmed end time as per the Y2K bug, so has the potential to affect far more things in 2038. (231-1 = 2,147,483,647 seconds after 1 January 1970)
Most new computers are 64 bit, and the time is set in 64 bit, [the 64-bit machines will have the huge capacity to count up to 9,223,372,036,854,775,808] in seconds will not run out and reset until way past the end of the universe (292 Billion years from now for 64 bit) so that is good.
My phones
Both my Huawei & Alcatel phones will only let me set a date after 1970 and before 2038.


Apparently iOS, Linux, Android all have Unix Epoch time, but MS Windows doesn’t ( still researching).
In an article “Psy’s Gangnam Style music video uploaded on YouTube, that previously used a 32-bit value to track the number of views for a video. That video garnered so many views that it crossed the 32-bit threshold. YouTube has since begun using a 64-bit value to track the view count for its videos, stating they did not expect the number of views for a video to cross the 32-bit value”. What Is Epoch Time All About? By Divya Lakshmanan
On December 3rd, 2014, South Korean pop-star Psy’s video ‘Gangnam Style’ broke all the records of views. So much so, that the number of views exceeded 2,147,483,647. But, YouTube being run on 32-bit processors, was not able to count beyond this number and the website crashed. The engineers at YouTube were able to quickly fix the issue by upgrading the system to 64-bit.
I’m supprised that the vid had that many hits but its entertaining. (3,789,444,789 views•Jul 15, 2012)
This is a good overview vid of the issue.
Epoch Time
- Epoch Time in the real world starts at the time of 00:00:00 UTC, where UTC stands for Coordinated Universal Time.
- Apple macOS considers its Epoch Time as starting from January 1, 1904.
- Microsoft Windows considers its Epoch Time as starting from January 1, 1601.(but is based on 64 bit so goes way way past 2038). Windows NT uses a 64-bit integer to track time. However, it uses 100 nanoseconds as its increment and the beginning of time is January 1, 1601, so NT suffers from the Year 2184 problem. 1 nanosecond = 1 billionth of a second (so 10 millionth of a second)
- Unix and Linux Systems consider their Epoch Time as starting from January 1, 1970. This time is also referred to as Unix Time and Unix Epoch.
Unix Time is stored as a 32-bit signed integer value. As every second ticks away, the value keeps increasing, and it will eventually reach its limitation on 03:14:07, 19 January 2038 as the 32-bit signed integer value will overflow and reset itself to December 13, 1901. When this happens, it will disrupt numerous time-bound activities on a system like software licenses, backup operations, etc. This issue is referred to as “Year 2038 problem.”
Some people suggested the 32-bit value should be changed to an unsigned integer value. This meant Unix systems would be able to interpret dates up to the year 2106. [0 through 4,294,967,295 (232 − 1) for representation as an (unsigned) binary number] However, this was found to not be effective for dates prior to 1970.
Signed being it could be “Plus” or “Minus”[−2,147,483,648 (−231) through 2,147,483,647 (231 − 1)]. So if only plus then can go on a bit longer. Unix systems would be able to interpret dates up to the year 2106. [0 through 4,294,967,295 (232 − 1) for representation as an (unsigned) binary number]. See Wiki article on 32 bit computing.
Issues of Embedded devices.
Generally there is a feeling that most new devices are updating to 64 bit time. The concern is for embedded units that were never envisaged that they would need tampering or updating in their life, so some of the items in cars for ABS and other computer monitored devices. Planes etc. Im also thinking of pumps and other utility services items that monitor flow etc. Examples of embedded real time systems.
The only computers that can face some issues due to the Year 2038 problem are those with embedded systems. Many of these embedded systems are used in systems with long life, such as transportation systems, some isolated computer systems, and stability control systems. As a result, the embedded systems need a complete replacement as their software cannot be upgraded.
An interesting article on Stack Overflow regarding altering time from unix to windows. Windows epoch from 1601 (but 64 bit time). I like the idea of updating times in a database and shifting over to a different timeframe reference.
Site showing unix time and how to get it. I find these sites useful as they usually have some scripts on how to do the change over in different programming languages.

This is an entertaining video about other time issues after Y2k, Y2k38 & Y10K, Y100K and on . Beyond Y2K: More Computer Time Problems:
I thought the comment about astronamers & other people thinking out beyond the year 10,000 and the idea of 02020, adding a zero point on at the beginning of years for computers now is an interesting idea.
A general explanation from 2013, interesting the presenter had worked on the Y2K.
A general reflection of the Y@K bug below, and an interesting reflection on people not upgrading existing hardware and also massive spend to ensure there were no major failures. Another interesting thing is systems in place to identify what to do if it did go down and how to manage, and in 9/11 how those systems helped get Wall Street re-opened very quickly after the attack.
All of this got me thinking about real time embedded systems that could fail, so I started to look at systems that would need real time monitoring.
Time and measuring in embedded systems
Some architectural real time systems such as security and HVAC
These are the sort of systems that potentially could be causing issues as well as things like sprinkler systems and lifts in buildings.
End comment
An interesting computer feature that willl develop over time, especially as the year 2038 gets closer.