My Favorite Bug Report
Today’s entry on The Daily WTF reminded me of something.
(For those who don’t know, Daily WTF is a forum where users post examples of code that’s badly designed in interesting or entertaining ways. The vast majority of these are in Visual Basic, which is a either a sign that A) the owners of the site code in VB, or B) VB tends to attract lots of novice, inexperienced developers. Both are demonstrably true.)
Anyway, so here’s the situation: we had just finished building support for timezones into a course management system; some tests and quizzes were open to students only for a short time window, so it was important that the times be in synch and reported correctly to all users.
This is a lot harder than it sounds, first because there are a huge number of timezones on the planet, many of which share the same abbreviations; most have different rules about when or if daylight savings time occurs, and some are just plain bizarre (Riyadh Solar Time was designed to set sunset to 0:00 local time, giving it a different offset every day. That one’s no longer in use, thankfully.)
It was extra-challenging in this case because the date format we used internally claimed to be UTC — that’s Greenwich Mean Time, basically — but was actually set to the server’s local time, which meant that I had to convert everything to UTC first, compensate for whether daylight savings time was in effect, then do the conversion to the user’s local time. That took a while to sort out.
Anyway, we’d gone through it, checked in the code, and started the QA process. Names and identifying details have been omitted to protect, well, me; the rest is verbatim from the bugtracking system:
… and so on. I’m still not clear what J thought daylight savings time is, but I guess he thought it was optional.