18

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

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Ryaner
  • 751
  • 6
  • 16

10 Answers10

13

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
  • 52,939
  • 59
  • 191
  • 278
  • 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 Jun 22 '10 at 16:06
13

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
  • 48,631
  • 24
  • 141
  • 189
11

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
  • 811,555
  • 193
  • 1,581
  • 1,452
  • 2
    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? – Dirk Vollmar Jan 05 '10 at 16:23
  • 14
    Because everybody knows that, if you can't express it in a Regex, it's just not worth doing... ;) – GalacticCowboy Jan 05 '10 at 16:33
  • May be to avoid string to integer conversions? – Alex. S. Jan 05 '10 at 16:47
  • 3
    Why not just sample the system date, and base the "too far in the future" off of that? WTF? – Dean J Jan 06 '10 at 15:19
4

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
  • 83,943
  • 34
  • 151
  • 241
4

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
  • 26,096
  • 4
  • 39
  • 62
4

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

Richard Ev
  • 52,939
  • 59
  • 191
  • 278
Larry Watanabe
  • 10,126
  • 9
  • 43
  • 46
  • 2
    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 Jan 05 '10 at 16:34
  • 2
    Or it might be the Y2K consultants who didn't make enough to retire :) – Larry Watanabe Jan 05 '10 at 17:14
4

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
  • 6,336
  • 2
  • 31
  • 40
2

Here is a screen shot of the norton symantec endpoint protection

alt text http://img695.imageshack.us/img695/4500/152010112800am.jpg

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
  • 32,732
  • 12
  • 87
  • 145
2

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).

Tower
  • 98,741
  • 129
  • 357
  • 507
2

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
  • 951,095
  • 183
  • 1,149
  • 1,285