Re:Halloween Egg
Posted: Thu Nov 03, 2005 2:11 am
what if you use a signed 64-bit variable for the seconds and an unsigned decimal 64-bit variable for the subsecond, based on the Unix epoch? That way, taking bit 0 and bits 33 to 63 will give you a valid Unix timestamp (that's identical) and you can make timestamps for any exact time/date for way more than the big bang in a resolution that's down to a multiple of 54 zeptoseconds (which is a millionth femtosecond, which is a millionth nanosecond, which is a billionth second).
It's only a linear amount larger than the unix timestamp (four fold, which is like a fart nowadays compared to the relative size of a unix timestamp in the time of VAXen), backwards-compatible in full (as far as the unix timestamp can do it that is) and precise enough for any calculation you should want to do (and if it overflows, it's infinite for any practical purpose).
Of course, [000...000] is negative infinity (before the big bang-era) and [111...111] is positive infinity (after the end of the universe, with a high degree of probability).
It's only a linear amount larger than the unix timestamp (four fold, which is like a fart nowadays compared to the relative size of a unix timestamp in the time of VAXen), backwards-compatible in full (as far as the unix timestamp can do it that is) and precise enough for any calculation you should want to do (and if it overflows, it's infinite for any practical purpose).
Of course, [000...000] is negative infinity (before the big bang-era) and [111...111] is positive infinity (after the end of the universe, with a high degree of probability).