tags:

views:

1100

answers:

11

There are a lot of reports of systems failing to understand the year 2010 but I've no idea why. Current systems I look after are working fine as far as I could tell but I'd like to know what the actual problem is to search better.

Could anyone shed some light on it please?

Edit: http://www.rte.ie/business/2010/0105/bug.html - Information about it affecting credit cards in Germany

+4  A: 

I've got a system at work that uses a one digit year field. Yes. One digit. So the reason this system is failing is that "2000" is expressed the same as "2010".

recursive
Is/was there any kind of rationale for that decision?
Paolo
I have no idea, and no real way of finding out.
recursive
"We'll never be using this software 10 year from now."
DA
Some versions of the TRS-80 DOS (like TRSDOS 6) used one octal digit (three bits) to represent the year. That was one of the things pushing me to get off the TRS-80 Model 4 and onto a Macintosh.
David Thornley
dan04
+4  A: 

The one I heard about was quick fixes people did for Y2K without thinking it through. So if xx < 10 then 20xx else 19xx.

Rich Adams
Doesn't really exaplain the 16
Martin Beckett
Where's 16 come from? Question just asks about systems failing to understand 2010. 0x10=16 could be one reason, sure.
Rich Adams
The 2010 to 2016 bug may not be the only bug here... This could very well explain the problem the German banks are having.
Austin Salonen
+13  A: 

One possible explanation is in the article below

http://www.theregister.co.uk/2010/01/05/symantec_y2k10_bug/

Reminds me of your recent article about cheap and dirty Y2K bug fixes where some unscrupulous programmers put in a simple if <10 = 20xx otherwise the date is 19xx

Richard Ev
Yep, I think you nailed it.
Thorsten S.
Windows, currently, has the same thing. Two-digit years are intrepreted as a date between 1930 and 2029. Which makes the code `if < 30 = 20xx otherwise the date is 19xx`. The fix is to smack people, willingly, using 2-digit years (including end-users)
Ian Boyd
+10  A: 

SpamAssassin had a rule to mark dates too far in the future as spam:

/20[1-9][0-9]/

The fix came a few days too late, but it's quite simple:

/20[2-9][0-9]/

See you again in ten years.

Mark Byers
First I though that you must be kidding. But then I checked https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6269. Doesn't seem too hard for me to compare two 4-digit integers with each other. Why do they use regular expressions for that?
0xA3
Because everybody knows that, if you can't express it in a Regex, it's just not worth doing... ;)
GalacticCowboy
May be to avoid string to integer conversions?
Alex. S.
Why not just sample the system date, and base the "too far in the future" off of that? WTF?
Dean J
+3  A: 

It might be due to the young developers who started their careers after Y2K and are using 1 digit to represent the year.

Larry Watanabe
Wouldn't this be more characteristic of an older developer who has more experience (a) minimizing these representations and (b) developing the systems where this is more likely to happen?
Austin Salonen
Or it might be the Y2K consultants who didn't make enough to retire :)
Larry Watanabe
+4  A: 

I took care of a little 2010 fail in a site last weekend, it was just the result of an oversight in coding though.

Someone thought it would be a good idea to set the value of a list item to the current dateTime.year.Now() when the list only contained items up to 2009.

ddlItem.findByText(DateTime.Now.Year.ToString())
Tj Kellie
+2  A: 

Here is a screen shot of the norton symantec endpoint protection

alt text

Really nice that no one @ symantec informed their customers... Till the article was posted: http://www.theregister.co.uk/2010/01/05/symantec_y2k10_bug/

JonH
+2  A: 

It is that there is a bug in a component that splits the year in two parts. The second part is used in a comparison so that the digit 10 is not in base 10, it's in base 16 meaning that it's 0x10 = 16 (hex).

rFactor
+12  A: 

Several protocols used in banking and telecommunications - including the SMS protocol - encode the year as BCD in a single byte.

From 2000-2009 one could easily make the mistake of interpreting the year as a standard binary number since the encoding would be the same:

Encoding  Binary-interpreted  BCD-interpreted
0x01      2001                2001
0x02      2002                2002
...
0x09      2009                2009
0x10      2016                2010
...

That is most probably the cause of the Windows Mobile bug.

Rasmus Faber
A: 

SlashDot had a recent article.

Upper Stage
+2  A: 

I used Google Code Search to find y2010 bugs in open source software. I looked for one particular pattern that would indicate a bug (use of "200%d" as a printf format string), and found several projects with that bug. Creative application of search patterns could probably turn up more different kinds of bugs.

Greg Hewgill