Why the PS3 (and I) got its dates wrong

In: Development|Technology

2 Mar 2010

Just a very quick blog post!

I had exactly the same problem in a piece of code yesterday that Sony had with their PS3 and the PSN yesterday. It’s looks like its because Sony (and I) were using the ISO year.

The article which helped me with my code is here:

http://stackoverflow.com/questions/1978051/zend-datetostring-outputs-the-wrong-year-bug-in-my-code-or-zend-date

And the Wikipedia page that explains it here too:

http://en.wikipedia.org/wiki/ISO_week_date

“The system has a 400-year cycle of 146 097 days (20 871 weeks), with an average year length of exactly 365.2425 days, just like the Gregorian calendar. In every 400 years there are 71 years with 53 weeks.”

FacebookTwitterShare

1 Response to Why the PS3 (and I) got its dates wrong

Avatar

dilapper

March 2nd, 2010 at 12:06 pm

So, using this ISO year, would you have fallen foul of the same bug they had, where (I believe) it thought 2010 was a leap year?

Because all I could work out from that stackOverflow article was that the first week of 2010 is actually the 53rd week of the ISO-year 2009. That all makes sense, but left me wondering why it would cause problems now (or rather, yesterday).

Does that explain why 01/03/2010 caused such a problem?

Comment Form

About this blog

Blog of Jon Reed. I am Senior Software Engineer, at AOL UK. I believe in working had & playing hard. I love gadgets and technology.

  • Jon Reed: That's the great thing about trying to track people this way. These cookies are detected/set/get all [...]
  • Mike Pearce: Good post and some useful information. However, the biggest problem with use flash cookies is Apple. [...]
  • Paul M.: Congratulations! [...]
  • Mike: Woo! [...]
  • Mike Pearce: Great post mate, some advanced stuff. What do you suggest as an alternative to document.write(). [...]