About | ACP | Buy | Forum | Industry Watch | Learning Curve | Search | Twitter | Xnews
Home » Industry Watch » The Technological

Apple's Very Disturbing Bug

The sky is really falling.


Buy It

Try It

IPHONEWORLD (Rixstep) — Users of Apple's fabulous iPhone are once again plagued by a time bug. This time the bug's related to their slick 'Do Not Disturb' function - the function does't roll over into the new year until Monday 7 January.

Oops.

Not the Only Time

As with file systems, Apple seem a bit in the dark when it comes to date and time data. A similar thing occurred in January 2011, and it's happened for time changes as well.

You'd think the sky had fallen - for real. There are hundreds of essentially repetitive articles on this antediluvian holocaust. And Apple - what will they do? They will calmly look into matters after 7 January.



Some people think this is lame. Yet they're probably at a loss for words how the Cupertino company could correctly analyse the current issue and refactor it in time for Monday.

Yet it's still a wonder things like this can get out the front door. As several people have already shown online how easy it is to do QA on this function, the question must be asked: why couldn't Apple do it as well?

Someone at MacRumors of all places posted the following test results.

2013: Issue fixed on Sunday Jan 6
2014: Issue fixed on Sunday Jan 5
2015: Issue fixed on Sunday Jan 4
2016: Issue not happening even though first day is a Friday
2017: Issue fixed on Sunday Jan 8 (Jan 1st is also a Sunday)
2018: Issue fixed on Sunday Jan 7
2019: Issue fixed on Sunday Jan 6
2020: Issue fixed on Sunday Jan 5
2021: Issue fixed on Sunday Jan 3
2022: Issue not happening even though first day is a Saturday
2023: Issue fixed on Sunday Jan 8 (Jan 1st is also a Sunday)
2024: Issue fixed on Sunday Jan 7

So why couldn't Apple do this as well?

A Year is Not a Year

There's a distinction between different types of years. The following code, posted online and brushed up to be visible, should clarify what's going on. The claim seems to be Apple chose the formatting substring 'YYYY' when they should have chosen 'yyyy'.

-(void)applicationDidFinishLaunching:(NSNotification *)note {
    NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
    NSDateFormatter *df = [[NSDateFormatter alloc] init];

    [df setDateFormat:@"YYYY/MM/dd hh:mm:ss"];

    NSDateComponents *components = [[NSDateComponents alloc] init];
    [components setYear:2012]; [components setMonth:12]; [components setDay:31];

    NSString *dateStr = [df stringFromDate:[gregorian dateFromComponents:components]];

    [df setDateFormat:@"yyyy/MM/dd hh:mm:ss"];

    NSRunAlertPanel(@"YYYYyyyy",[NSString stringWithFormat:@"YYYY:\n%@\n\nyyyy:\n%@",
            dateStr, [[df dateFromString:dateStr] description]], 0, 0, 0);
}

That code yields the following.

Apple's notes state the following in reference to their own sample code.

There are two things to note about this example:

  1. It uses yyyy to specify the year component. A common mistake is to use YYYY. yyyy specifies the calendar year whereas YYYY specifies the year (of 'Week of Year') used in the ISO year-week calendar. In most cases yyyy and YYYY yield the same number, however they may be different. Typically you should use the calendar year.

  2. The representation of the time may be 13:00. In iOS, however, if the user has switched 24-Hour Time to Off, the time may be 1:00 pm.

So it looks like Apple may not have followed their own advice.

Look at the Sky!

Pressed to the wall in situations like this, the Gruber comments only that the bug makes him appreciate the feature even more.

'Being forced to turn this off manually reminded me just how great a feature Do Not Disturb is.'

El Reg's coverage is good and balanced. An extensive links section follows the article below.

Many reports called on the irony of Apple's new ad with the Williams sisters.



Others think this has something to do with the Mayan calendar or a possibly imminent Martian invasion again. With everyone's smartphones screwing up and many people not yet fully sober after the holidays, this is of course the ideal time to strike.

Not the Only One

Apple aren't the only company plagued by poor programming and poor QA when it comes to date and time.

The incident below takes place soon after the Premium Release of Windows 95 and about one week before my corporation scrapped it altogether. I had 95 installed in my home and it was Saturday night and time for bed. I kicked in the screen saver and joined my wife under the covers.

Some hours later I was wakened from a sound sleep by a commotion in the next room. The wife did not wake, but I did, and I was curious what had caused the noise and went in to check.

It was the computer. The monitor screen had a big message box planted on it. The wording was something to the effect:

'Microsoft Window 95 has detected that you have now gone over to standard time from daylight savings time and has adjusted your computer's clock accordingly. Thank you for choosing Microsoft Windows 95.'

I was impressed! When I returned to bed the wife was stirring and protesting my being up and about. I told her 'you'll never believe what that Bill Gates did now!' and as she drifted off again to sleep I gave her the whole story.

But my sleep and mirth with Microsoft did not last long. It was exactly one hour later that I was awakened again - and for the same reason! The computer's clock, put back from 3 AM to 2 AM by Wonderful Windows, had again hit 3 AM, and - you guessed it - Wonderful Windows again put it back to standard time. At this rate Sunday would never occur!

Even though I knew better I passed it off as a fluke and went back to bed. And both one hour later and two hours later (my time, not Microsoft's) I was rudely disturbed by the collective alternative intelligence of Redmond. At that point I turned the machine off, had a few moments of black insight into how things are done and tested in that cauldron of cerebral superiority, and decided then and there that Microsoft Windows 95 could never be taken seriously.

If it's bug, fix it goddammit. If you can't fix it, call it a feature.
 - IBM
Another time bug? Don't bother. Monday's around the corner.
 - Apple
I found it. The issue happens every year and fixes itself on the first Sunday of the year.
 - MacRumors
Good work on the testing! Perhaps MacRumors could put that information in the front page article so someone at Apple sees it as quickly as possible!
 - MacRumors

See Also
Apple Insider October 2010: Apple says iOS software update to fix pesky alarm clock bug
Whirlpool Forums October 2010: Did your alarm work this morning?
ZDNet October 2010: iOS daylight savings bug alarms users
Apple Insider November 2010: Apple details iPhone alarm clock bug in support document
Apple Insider November 2010: Europeans wake up an hour late as Apple fails to fix iPhone alarm clock bug
Apple Insider January 2011: Apple confirms New Year's alarm bug, says to wait until Jan 3
Apple Insider January 2013: Apple says New Year's 'Do Not Disturb' bug will fix itself Jan 7
Apple KB November 2010: iOS 4.1: Repeating alarms may trigger incorrectly before or after DST change
Apple KB January 2013: iOS 6: Do Not Disturb mode stays on after scheduled time
Apple KB November 2012: iOS 6: Using Do Not Disturb
Apple Support Communities November 2010 Alarm turned off after daylight savings change?
Apple Support Communities January 2013: Do not disturb doesn't switch off in 2013
CBS News January 2013: Apple's Do Not Disturb function reportedly won't turn off in the New Year
El Reg January 2013: iPhone 'Do Not Disturb' bug to self-destruct on Monday
Grauniad January 2013: Do Not Disturb bug makes iPhone users even harder to rouse in new year
Grauniad January 2013: Do Not Disturb bug will fix itself, says Apple, as developers figure its cause
InvestorPlace January 2013: Apple: 'Do Not Disturb' Bug Will Get Fix on Jan 7
Mail Online January 2013: The bug keeping iPhone owners awake at night: Apple says 'do not disturb' issue will not be fixed (but will work again next week)
Mirror January 2013: iPhone 'Do not disturb' bug: Apple will not fix app until glitch resolves itself
Telegraph 2013: Apple won't fix Do Not Disturb bug
The Next Web January 2013: Apple says Do Not Disturb bug will correct itself automatically after 7 January 2013
USA Today January 2013: Apple says 'Do Not Disturb' bug will fix itself after Jan 7
Washington Post January 2013: Apple's Do Not Disturb bug: No fix until Monday

About | ACP | Buy | Forum | Industry Watch | Learning Curve | Search | Twitter | Xnews
Copyright © Rixstep. All rights reserved.