Pre-Millennium Tension: The Dali Clock Y2K Easter Egg

It's been over 12 years since I pulled this prank, so I guess it won't really be a spoiler to talk about it now...

You kids may have heard about that whole "Y2K" thing, where all the date-manipulating code in the world was going to go sideways once '99 turned into '00. Planes were going to fall from the sky, ATMs were going to jackpot cash into the street, nuclear power plants were going to melt down, dogs and cats were going to move in together, and so on. People were feverishly spending their time digging through any code that cared about what time it was. Warnings were added to compilers. Anyone who wasn't planning to convert their money to krugerrands and ammunition was a fool! It was a full-fledged nerd panic.

So I have this program Dali Clock that maybe you've heard of. And for many moons, Dali Clock had been distributed on the CDs along with just about every Linux distribution in the world.

And I had an Idea.

So, in late 1998, I hid a prank in it. I had to start on this project very early in order to ensure that there would be time for the code to make it out into the world: it would take at least a year for the release cycles of the various distros to pick up the new version and get burned and shipped out. Though, I was certainly helped along by the fact that everyone was in a Y2K-addled upgrade fever in 1999. It would simply not do to be running a software release from 1997, oh no. So I got my code out there, and nobody noticed it amongst the set of other diffs in the release.

The prank was this:

If you happened to be running Dali Clock exactly at midnight on Jan 1, 2000, it it would start running "backwards" -- at midnight, the digits would mirror right-to-left. But this would only happen if Dali Clock had been launched in 1999. If you quit and restarted it in 2000, it was all back to normal. The source code in question also avoided using any obviously greppable constants like "99" or "2000" or "946713600" that might have set off alarms.

A video:

I got a bunch of almost-hate mail between 12 AM EST and 2 AM PST from people who had dug into the code and then eventually realized that it had been intentional... and that it had been lying in wait there for years...

It was glorious.

Tags: , , , , , , ,

17 Responses:

  1. tjic says:

    It's no


    but it's good.

    ( )

    For those of us who need to do something else today than download the source and read through it, can you show the bit of code that implemented this hack?


  2. phuzz says:

    One day, someone will have to read through the stored procedures I've written here at work.
    and they will find that I tend to use swear words as variable names :)

    • Oh, you're that guy, eh.

      At one client site, we all refer to one of their original (now long-gone) developers as "dood", because that was this very favorite word in all the world and thus was the basis for countless variable names, sentinel values, database passwords, and so on.

      I wonder what they'll call you...

      • Ross says:

        My favorite was the previous maintainer of some embedded code who really liked hockey, and thought it was a fine idea to use hockey player's names for variable and function names. You've never coded until you try to understand what orr = lemieux(sawchuck, gretsky) is trying to accomplish.

        One week later, I had unobfuscated most of the codebase and could actually begin to make sense of what was happening.

  3. John Fiala says:

    That is some pretty cool stuff.

  4. Phil says:

    What, no time_t tag?

    You should also post the email threads. :-)

    • Ben Brockert says:

      There's only 49 if you actually click to page 5. More than none, but there will always be zombie pages.

    • Sheilagh says:

      What's the deal with 19112? Something to do with 1970 being the default "oldest time" on some computers?

      • DFB says:

        It's twelve years after what the Mayans got when they incremented 1999 to 19100 because they were storing "19" as a string and "99" as an integet.

      • Kyzer says:

        In UNIX, breaking a time down into its fields using ctime() gave you the year as a two-digit number. When Y2K approached, they retconned this into "the year minus 1900". People who work with strings rather than numbers (especially Perl people) found it easier to write "Today is $D/$M/19$Y" than "Today is $D/$M/".($Y+1900), and prior to 2000 there was nothing perceptibly wrong with this. After 2000, you get 19100, 19101, 19102... and now we're in 19112.

  5. Sheilagh says:

    you always waiting for the 2nd marshmellow, DIDN'T YOU!?

  6. Awesome!

    ... Now do one for 03:14:08 UTC on 19 January 2038. ;)

  7. Joe says:

    I wonder how many people tried rebuilding their kernel and switching distros because of this.