Siderite’s Favorite Bug

My favourite bugs come not from our code, but from the code of the things we depend on, like the javascript engine or the .Net framework. Either performance, unexpected behaviour or plain and simple errors in code really throw one off when trying to determine what they did wrong. My favourite bug comes from the Windows datetime. I was testing one application where I had introduced a new calendar control. I had worked quite a while on it and I was rather anxious to see if it would work without issues. Imagine my dismay when my boss told me she tried to click on a date, but it didn't work. The dates one day before and one day after or any other date would work fine.

All except this one!

Long story short, after debugging the heck out of the calendar control, I noticed that the specific date was a daylight saving date, but only for my home country of Romania. Several tests showed that if the date object was instantiated with the year, month and day only, it will set the date to the previous day, hours 23:00. The fix was to set up the date by specifying the hours 12, instead of the default 0. Since then the bug silently disappeared, maybe from a Windows update of some sort. However, I still remember it fondly.

-- Siderite


Do you have a bug whose story you love to tell? Let me know!

Comments (0)

Skip to main content