The Simple Error That Might Be the Source of the Do Not Disturb Bug

20130103-114238.jpg

The bug in the automatic Do Not Disturb function in iOS 6 has caused equal amounts of frustration and chuckles (since Apple aired a commercial highlighting the feature the day the bug hit us all), but today some developers have shed some light on why the bug is happening in the first place. And it all comes down to capital letters.

Both TUAW and Ars Technica have posted the suspected cause of why the automatic Do Not Disturb feature isn’t working right now (but will resolve itself on Monday), and it comes down how Apple expressed the year in the DND code in iOS 6. Some clever folks have found that DND expresses the year with YYYY, which corresponds to the ISO definition of what year it is. That shouldn’t matter, right? Usually, you’re right, but it turns out that the ISO definition of when 2013 starts doesn’t match up with the actual calendar year, which would be expressed as yyyy.

In the TUAW post, a commenter said that according to ISO standards it really is 2013 (there is some convoluted thing about the year starts the first week with a Monday and Thursday…), but developers who work with calendar apps (as quoted in Ars Technica), that regardless of ISO or whatever, YYYY and yyyy do not return the same value right now (I’d love to know what DND thinks the year is). It’s that programming choice, using YYYY instead of yyyy (yyyy matches the Gregorian calendar, btw) that is likely the culprit here. Not only that, Apple knows this is problematic and the difference between YYYY and yyyy confuses lots of developers who are working on date-based apps (probably any app, really).

The Ars article points out that it’s odd that DND factors the year into the code at all, when really it just needs to know the time to function (though it would be awesome to have different weekday vs weekend DND schedules). Still, whatever the root cause, it’s frustrating for everyone—most especially Apple I’m sure—that this cool feature isn’t working as it should right now.

Heck I had to turn DND on manually last night, since it didn’t turn itself on at 11 PM as it should have. Monday, frankly, can’t get here soon enough.

Photo from Flickr by Dan Moyle.

Like this post? Share it!

Categories: iOS, iOS 6, 6.0.1, 6.0.2