What time is it anyway?

A bug in computer and systems engineering parlance is when software doesn't run in a way that you expect. In other words it runs perfectly well in a way that you don't want. As with other things in life allowing the perfect to get in the way of the good will keep most things from the ever existing. I've learned through my travels that when explaining something technical it is better to be simple than to be accurate and on November 3rd 1971 and engineer working on the Unix project noted the following for the time command under the bug note;

"The Chronological-minded user will note that
2**32 sixtieths of a second is is only about 2.5

This is a perfect example of being all three at once.(A literal bug, good but not perfect and simple not accurate)
The Unix epoch was original designed as a standard way to keep time across computer systems. It was useful in logs as you could calculate when something had occurred regardless of timezone or messing around trying to calculate if you were supposed to be using standard time or saving time.

The epoch was calculated at 60Hz which was the speed of the processors at the time so that once a cycle it would tick up by one. This of course presented a problem when dealing with 32bit integers. With 32 bits you can count to just over 4 Billion, count to 60 every second and keep that up for just over two years until time runs out. This was "fixed" sort of....when the epoch was redefined to be measured at 1Hz or once per second and the date was changed from Jan 1 1971 to Jan 1 1970, midnight UTC. This again is not exactly accurate but for the purpose of this story is good enough. Based on this shift the new time to the end of the world is in 2038 when we finally realize that 32 bit numbers are just way too small in a ever growing digital age.

I find it funny that when the Mayans ended their calendar we decided that it was based on ancient knowledge about the end of days and foretold the end of the world but when modern system programmers do it then it is a bug in the software and could you all please learn how to count using larger numbers. The millennium problem (Y2K) was of course the same thing. It was an oversight in programming logic but thanks to the internet and CNN we all thought that every nuclear warhead would explode exactly at midnight and that planes would fall from the sky. How a timestamp in a computer log could cause the stock market to hit zero or for every computer system in the world to crash in a cataclysm i'm not sure but it sold a lot of caned food and gave us Office Space.

I wasn't planning on doing this but the current epoch is 1648300227. That is how many seconds it has been since midnight, on new years day, somewhere in England, in the year one thousand nine hundred seventy, as described by the birth of a man, as designated by a Catholic man to get rid of the calendar put in place by a Caesar man....crap time is sexist.... moving on

DST is dumb and we need a better way of keeping time. Whenever you want to start the epoch just remember to use a 64 bit number so we can ignore the problem until 15:30:08 UTC on Sunday, 4 December 292,277,026,596.

You'll only receive email when they publish something new.

More from Karl Murray
All posts