This coming Friday is the 13th, but just before midnight something very interesting happens. I’m not going to stay up to watch it, or anything like that, and it’s really only interesting if you are a computer geek. Well, not only a computer geek, but a programmer geek, and one with an interest in the Unix family of operating systems.
But don’t worry, I’m going to tell you about it anyway.
Programmers don’t like to deal with dates and times. Calculating intervals between dates and, even worse, between times within different dates is a major pain. You cannot merely add and subtract, because not all months have the same number of days, and some months have a different number of days depending on the year. So we use something called a timestamp for storing dates and times. It’s really quite simple; it’s just a very large number containing the number of seconds which have elapsed since the very beginning of, no not time itself, merely the day Jan 1, 1970.
Well, we’re dealing with computer geeks here, not archeologists.
There are some disadvantages to that method. What about dates earlier than that? Well, we deal with that by using negative numbers. Is there a “Y2K” type issue? Yes, there is; in the year 2038 that date will “overflow” a 32-bit integer, and that is a bit of a problem, but we are talking about this coming Friday.
On Friday, Feb 13, 2009 at 28-1/2 seconds before midnight, that number becomes:
Apparently my excitement threshold is pretty low.