I think Unix time can be a lot of fun!
If you don't know what Unix time is, it's the way a lot of computers (anything running Unix or Linux, which includes modern Macs, iPads, iPhones, Android devices, and so much more) keep track of time, which is by counting the number of seconds since the start of the year 1970 UTC. The current Unix time is supposed to be written here, but maybe there's something wrong with the JavaScript.
However, I prefer to write Unix times in hexadecimal (base-16). The current Unix
time in hexadecimal is —this
page requires JavaScript, sorry. (Numbers written in hex are written with
the letters a through f as well as the traditional decimal digits 0
through 9. Often times, hex numbers are prefixed with 0x to distinguish them
from decimal numbers.)
By the way, my blog's current setup shows each post's time as Unix time hexadecimal, as well as the ISO Gregorian and week-date formats.
Some dates of note
To get us started, here are some dates of note in Unix time. At the time I am posting this, we have a ways to go until we need another hex digit (except we might have more trouble before that—more about that later).
Division by powers of 4
Dividing by 16 (and rounding down) a number in hexadecimal is equivalent to shifting all the digits one space to the right, similar to dividing by 10 when working in decimal. However, because 16 is a perfect square, we can do a kind of half-shift by dividing by four.
Rounding
In this table, we round down and up to the nearest multiple of a power of 16.
Adding/subtracting powers of 4
This is like changing one digit by 1 or 4.
Adding/subtracting multiples of something
Bascially, I'm changing the first digit here.
How long until an epoch fail?
Okay, the sad truth is that older programs store the Unix time as a 32-bit signed integer. Storing as a signed integer makes sense, as it allows dates before 1970 to be stored. But storing as a 32-bit signed integer means that we overflow into the negative a second after we hit 0x7ffffff. This is called the year 2038 problem.
Fortunately, people tend to design things to store Unix time as a 64-bit integer nowadays, which will last us roughly 300 billion years.
As of the writing of this page, about 12 years before the epochalypse, the heading above reads "How long until an epoch fail?" After 2038-01-19 03:14:07 UTC, the word "until" will be replaced with "since", thanks to the magic of JavaScript.