What great pleasure this thread gave me. My Thai daughter confirmed the joke and, after a very painful explanation of bases, was laughing (tentatively) along with me.
Does anyone else get a sense of vertigo when they try out numbers like 3000000000 (January 23, 2065)? It's like it's close enough to be tangible but far enough to be scary.
Interestingly, there is an error in your code: number of seconds in a year is not constant, so you might get next year before a new year.
Here's a fixed version: http://jsfiddle.net/r8txd/4/show/
I wanted the rate of time increase to be constant every year, and I wanted the time to be universal (across all timezones). I did take leap years into account by calculating the average year length in seconds. I also wanted the calculation to be simple and independent of variations in earth's rotation speed changes, etc. So yes, over a long time, it will diverge from "years" as we know them.
The only reason I used years is to provide context, since most people have a feel for how long a year is. After that, everything is base 10.
Did anybody notice Sun, 09 Sep 2001 01:46:40 GMT, when it was 10000....? And why looking at decimal values, anybody calculated when we have some nice binary timestamps?
The FreeBSD Project actually had a gigasecond bug -- the cvsup protocol (used for CVS tree replication and checkouts) transmitted time as an ASCII seconds-since-epoch value, and when September 2001 arrived, the changed string length caused a protocol sanity check to fail.
Yes. In java at the time if you wrote a number with 9 or less digits, it would always be considered to be an int. If the number was above 1 billion (10 digits), you had to end it with an L (1000000000L), probably since it possibly could overflow an int.
We had a trial version of our software that would expire after 30 days. To make that we had a script that inserted the expiry date into the source and recompiled every night. Around 30 days before it passed 1 billion the compiler started to give an error, and the script crashed.
(It may actually have been 12->13 digits, since java use milliseconds since the epoch, but I'm not so sure this many years later)
Openldap got hit by the billennium bug. I remember because we told our Noc to keep an eye open (Sunday afternoon where we were) and we started getting alerts that all LDAP replication was broken.
"Gentlemen," he said, "I invite you to go and measure that kiosk. You will see that the length of the counter is one hundred and forty-nine centimeters-in other words, one hundred-billionth of the distance between the earth and the sun. The height at the rear, one hundred and seventy-six centimeters, divided by the width of the window, fifty-six
centimeters, is 3.14. The height at the front is nineteen decimeters, equal, in other words, to the number of years of the Greek lunar cycle. The sum of the heights of the two front corners and the two rear corners is one hundred and ninety times two plus one hundred and seventy-six times two, which equals seven hundred and thirty-two, the date of the victory at Poitiers. The thickness of the counter is 3.10 centimeters, and the width of the cornice of the window is 8.8 centimeters. Replacing the numbers before the decimals by the corresponding letters of the alphabet, we obtain C for ten and H for eight, or C10H8, which is the formula for naphthalene."
"Fantastic," I said. "You did all these measurements?"
"No," Aglie said. "They were done on another kiosk, by a certain Jean-Pierre Adam. But I would assume that all lottery kiosks have more or less the same dimensions. With numbers you can do anything you like. Suppose I have the sacred number 9 and I want to get the number 1314, date of the execution of Jacques de Molay-a date dear to anyone who, like me, professes devotion to the Templar tradition of knighthood. What do I do? I multiply nine by one hundred and forty-six, the fateful day of the destruction of Carthage. How did I arrive at this? I divided thirteen hundred and fourteen by two, by three, et cetera, until I found a satisfying date. I could also have divided thirteen hundred and fourteen by 6.28, the double of 3.14, and I would have got two hundred and nine. That is the year in which Attalus I, king of Pergamon, joined the anti-Macedonian League. You see?"
"Then you don't believe in numerologies of any kind," Dio-tallevi said, disappointed.
It's amazing that there's only 24 years left until 2^31 seconds since the epoch... I'm looking forward to January 19, 2038 (provided that I'm still around by that time...)
Actually 2038 is scary because it can affect many systems that need to calculate things long (pun intended) in the future. Imagine if you take a 25 year mortgage and the backend system still uses 32bit clock_t...
Because it's a neat looking number. Human brains are real good at finding patterns, and mulling over where there appears to be no patterns, hence things like the interesting number paradox ( http://en.wikipedia.org/wiki/Interesting_number_paradox ), or our puzzlement over disorders like schizophrenia, where those mechanisms break down.
Maybe subtle software issues introduced by people not taking into account the possibility of their software somehow living past the projected life-span is?