News for hackers. Stuff that matters.
Re:Perfect timing: a bug that only shows up in the first 250... by qntm on Sunday April 10, 2011 @06:35PM (#2430616)
Bugs in time-based code are great. The most amusing example I've seen was an intermittently-failing automated test case which, I discovered after careful scrutiny of the results database, failed only on Sundays.

There's also the classic time zone unit test "convert this Europe/London timestamp to America/New_York time, verify that it is now 5 hours behind", which, due to Bush's pointless Daylight Saving shift, now fails for two weeks twice a year. Of course, two weeks is just short enough and the bug is just inconsequential enough (the time zone code itself is working correctly, after all, it's the test case that's broken) that the regression goes away before anybody fixes it.

I can only imagine how much otherwise robust code flips its lid when presented with, for example, a leap second. It's the number one argument for the use of mock objects in testing.

Re:Perfect timing: a bug that only shows up in the first 250... by yahelc on Sunday April 10, 2011 @10:15PM (#2431065)
"Bush's pointless Daylight Saving shift"

?

Staunch Democrat though I may be, how is the Daylight Savings shift Bush's fault?

Re:Perfect timing: a bug that only shows up in the first 250... by xinsight on Sunday April 10, 2011 @11:04PM (#2431205)
One of the last things he did in office was move it 2 weeks earlier. Canada followed along and now North America is out of sync with most other countries.
Re:Perfect timing: a bug that only shows up in the first 250... by mooism2 on Monday April 11, 2011 @04:12AM (#2431871)
North America was out of sync with Europe before this change. North America used to put the clocks forward on the first Sunday of April; now that happens on the second Sunday of March. Europe standardised on the last Sunday of March during the 90s.
Re:Perfect timing: a bug that only shows up in the first 250... by burgerbrain on Sunday April 10, 2011 @11:33PM (#2431263)
So just use UTC and get on with your life?
Re:Perfect timing: a bug that only shows up in the first 250... by xinsight on Tuesday April 12, 2011 @08:55AM (#2436942)
I'd prefer to just get rid of DST.