Click to Skip Ad
Closing in...
  1. MyQ Smart Garage Door Opener
    11:06 Deals

    Unreal Prime Day deal gets you a MyQ smart garage opener and a $40 Amazon credit for $17

  2. Amazon Dash Smart Shelf
    15:16 Deals

    I’m obsessed with this Amazon gadget you’ve never heard of – and it&#821…

  3. Prime Day Deals 2021
    04:05 Deals

    Amazon Prime Day deals 2021: See hundreds of the best deals right here

  4. Amazon Gift Card Prime Day Deals
    07:58 Deals

    Free money is definitely Amazon’s hottest deal of Prime Day 2021

  5. Home Theater Projector Deals
    20:21 Deals

    Why buy a TV when Amazon’s Prime Day home theater projector deals start at $302?

Programmer reveals cause of Zune blunder

Zach Epstein
January 3rd, 2009 at 11:03 AM

Ok, someone please tell Nelson Muntz he’s on in five… Now that Z2K has come and gone, we have to sit back and wonder how something so widespread could have such a simple fix – wait till it dies, then turn it back on. For real? The good thing, we suppose, was that if there were people who couldn’t manage their way to Google to search for an answer, their Zunes would eventually just start working again. The bad thing of course, was that the cause of the problem was probably something bush league. Indeed – here is the explanation from itsnotabigtruck of Zune Boards:

The Zune’s real-time clock stores the time in terms of days and seconds since January 1st, 1980. When the Zune’s clock is accessed, the driver turns the number of days into years/months/days and the number of seconds into hours/minutes/seconds. Likewise, when the clock is set, the driver does the opposite.

The Zune frontend first accesses the clock toward the end of the boot sequence. Doing this triggers the code that reads the clock and converts it to a date and time. Below is the part of this code that determines the year component of the date:

Under normal circumstances, this works just fine. The function keeps subtracting either 365 or 366 until it gets down to less than a year’s worth of days, which it then turns into the month and day of month. Thing is, in the case of the last day of a leap year, it keeps going until it hits 366. Thanks to the if (days > 366), it stops subtracting anything if the loop happens to be on a leap year. But 366 is too large to break out of the main loop, meaning that the Zune keeps looping forever and doesn’t do anything else.

Here it comes… Haaa haaa! The affected source code causing this bug can also be found in a few other portables such as Toshiba’s S series. If you happen to be one of the few people out there with one of those puppies and you haven’t resolved the issue by now, the fix is the same so don’t fret. We have to imagine Microsoft will have a fix in place before 2012, the next leap year, but this was a massive bungle that Redmond certainly can’t wait to be forgotten. Sure most people will forget, but we wonder if a bad enough taste was left in the mouths of Zune owners to make them think about jumping ship. Some will, no doubt, but we don’t imagine any hardcore anti-iPod people will have their allegiance swayed.


Zach Epstein

Zach Epstein has worked in and around ICT for more than 15 years, first in marketing and business development with two private telcos, then as a writer and editor covering business news, consumer electronics and telecommunications. Zach’s work has been quoted by countless top news publications in the US and around the world. He was also recently named one of the world's top-10 “power mobile influencers” by Forbes, as well as one of Inc. Magazine's top-30 Internet of Things experts.

Popular News