Slashdot Mirror


2016 Bug Hits Text Messages, Payment Processing

An anonymous reader writes "It seems some systems are suffering from a Y2K16 bug. When 2009 ticked over to 2010, some Australian EFTPOS machines skipped to the year 2016. Coincidentally, some Windows Mobile users are also having issues with their new year SMSes coming from 2016. What function could cause this kind of error?"

19 of 340 comments (clear)

  1. Why by Anonymous Coward · · Score: 5, Funny

    Uncle Bill decided to do some coding. That's why.

  2. Some kind of... by msauve · · Score: 5, Insightful

    BCD/binary mismatch?

    0x09 = 9 decimal when interpreted as either binary or BCD.

    0x10 = 10 decimal when interpreted as BCD, as 16 when interpreted as binary.

    --
    "National Security is the chief cause of national insecurity." - Celine's First Law
    1. Re:Some kind of... by Anonymous Coward · · Score: 5, Informative

      I don't think you quite have the hang of binary (10 would be 2, not 3).

    2. Re:Some kind of... by kalidasa · · Score: 4, Funny

      Facepalm. I'm gonna get mauled for this one.

    3. Re:Some kind of... by msauve · · Score: 5, Informative

      No, I meant exactly what I said. I didn't say 0b01. 0x10 is the hexadecimal notation for "00010000" binary, which is 16 decimal.

      I used 0x10 because that's standard ANSI C (and ECMA-334 C#), and C is what seems to be spoken on /.. 0b00010000 is non-standard (but allowed by some compilers).

      --
      "National Security is the chief cause of national insecurity." - Celine's First Law
    4. Re:Some kind of... by clone53421 · · Score: 4, Informative

      Let me see if I can straighten it out, then.

      0x10 is a hexadecimal number, 0001 0000 binary, 16 decimal.
      0x10 is a BCD number, 0001 0000 binary, 10 decimal.

      (BCD is an encoding system, not a base system. In hex or binary it’s given in encoded form, but in decimal it’s given in decoded form.)

      --
      Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
    5. Re:Some kind of... by Vintermann · · Score: 4, Informative

      > (a leftover relic from the mainframe era that needed to die over a decade ago)

      No no no. Binary coded decimal is necessary and useful. When you divide 1 by 10, you should get 0.1, not 0.10000000000000001 (which is what you get if you for instance open up a python interpreter and ask for 1.0 / 10.0).

      Monetary amounts, and currency conversion rates are examples of something you should never, ever use standard binary floats for.

      Fact: Many major databases use some form of BCD for representing currency values. Enough so that IBM added a dedicated decimal FPU for their power6 series - it's so common on business database servers that it actually saves a lot.

      --
      xkcd is not in the sudoers file. This incident will be reported.
    6. Re:Some kind of... by Mr+Z · · Score: 4, Interesting

      I wouldn't say it's incorrect. It's quite common to represent binary strings as hexadecimal strings regardless of the underlying format. After all, what units would you apply to an x86 opcode? what about a portion of an H.264 bit stream? Or heck, even a floating point number? 0x3F800000 is the hexadecimal representation of the IEEE 754 single precision floating point number 1.0. (And if you don't think people write floating point numbers in hex, think again.

      Now the integer 10 encoded in standard binary format would be 1010, which written in hexadecimal would be A (or 0x0A in C syntax). It also happens to be the same as if you directly went from base 10 to base 16 and ended up with 0x0A. If the decimal number were encoded as BCD, though, the resulting binary string would be written 00010000 (or 0001 0000 if you so choose--the spaces are insignificant!), and that binary string is equivalent to the hexadecimal string 0x10. Note that "hexadecimal string" does not imply base-16 number. It's just a shorter representation than the binary string. It is not equivalent to the hexadecimal number 0x10. When I said "written in hexadecimal", I meant "when written as a hexadecimal string."

      Look at it this way: If I were trying to hex-dump a file full of BCD values and the file had nothing but the value "10" (decimal) over and over in each byte, I would see 0x10 in every byte, not 0x0A. Try it. Go write a 6502 or x86 program that uses that processor's BCD mode, and then do a hex dump of memory. Or better yet, go get a BCD number, and pass it to the "%x" format specifier in your favorite C compiler (or other language that uses C's format specifiers).

      In this case, one guy is talking BCD, another guy assumed binary, and it was no big deal until 2010 rolled around and 10 suddenly became 16.

      I think you mean to say "one guy is talking BCD, another guy assumed standard binary integer. The "B" in BCD is "Binary" after all... Every number stored in the computer is in one binary format or another. Saying "assumed binary" is roughly the same as "assumed the number was stored in a computer." You have to say which format.

  3. Microsoft by sopssa · · Score: 5, Informative

    Seems Microsoft is supplying some code for EFTPOS machines that is common with Windows Mobile, so it's most likely the same bug in both.

  4. My wireless landline phones all failed 1/1/2010 by Gorobei · · Score: 4, Interesting

    No dial tone, no incoming calls.

    Had to reset the internal datetimes back to 2007, then they started working again. Nice job, Panasonic.

  5. 10 hex is 16 decimal by Anonymous Coward · · Score: 5, Informative

    Could be botched string parsing. Could be binary coded decimals interpreted as binary numbers: BCD encodes two decimal digits in the high and low nibbles of a byte. Therefore BCD 10 is 0001 0000 in binary, which is 16 in decimal.

    1. Re:10 hex is 16 decimal by nycguy · · Score: 5, Informative

      This is almost certainly what it is. The year is stored in an SMS message as a two-digit BCD value, according to this spec. (Click on the link for the "timestamp" field.) Some phones must be treating it as a hex field. (Note that most other fields in the SMS message are in hex.)

    2. Re:10 hex is 16 decimal by Pembers · · Score: 4, Informative

      The specification for the SMS message format pre-dates Y2K by about 15 years. I came across it in 1995 (and thought it was useless - what sort of idiot would try to fit a message into 160 characters? And who would want to type it on a 12-button keyboard?). Where I worked, nobody worried about Y2K until about 1998.

    3. Re:10 hex is 16 decimal by Anonymous Coward · · Score: 4, Informative

      The endianness may make it more sensible. If you have 0x12345678 represented using the correct endianess (the Intel one, not the Sun one), it'll be stored as 0x78563412. Using reverse nibble notation, it'll be 0x87654321.

      But as far as I remember, it is caused by oldold ties to the 4004, which was a 4-bit CPU, inherited via the 8008 and 8080 by the 8086 and 8088.

  6. Official explanation by Anonymous Coward · · Score: 5, Funny

    It's to avoid the world ending in 2012 by skipping straight to 2016. We've left a few years either side of the fateful date as a safety buffer.

  7. Re:Future SMS by CharlyFoxtrot · · Score: 4, Funny

    I did but all they told me was that I talk like a fag and my shit's all retarded.

    --
    If all else fails, immortality can always be assured by spectacular error.
  8. * points finger at Duct Tape Programmers by amn108 · · Score: 5, Funny

    Time to quote Joel (from www.joelonsoftware.com):

    Jamie Zawinski is what I would call a duct-tape programmer. And I say that with a great deal of respect. He is the kind of programmer who is hard at work building the future, and making useful things so that people can do stuff. He is the guy you want on your team building go-carts, because he has two favorite tools: duct tape and WD-40. And he will wield them elegantly even as your go-cart is careening down the hill at a mile a minute. This will happen while other programmers are still at the starting line arguing over whether to use titanium or some kind of space-age composite material that Boeing is using in the 787 Dreamliner.

    When you are done, you might have a messy go-cart, but it’ll sure as hell fly.

    Hey, Jamie! Your proprietary date datatype didn't fly! Would you please turn around and fix it?

    1. Re:* points finger at Duct Tape Programmers by daveime · · Score: 4, Insightful

      Yes, but that's just the point isn't it ?

      There are 10 types of people ...

      1. Those who will make a solution that will work for perhaps 30 or 35 years, because it is "good enough" for the foreseeable future, ala Y2K, 2032 for linux etc ...

      2. Those who will want to do unit tests to see if the date function still works in the year 9500, and won't pass it through QA until it does.

      Now, consider the PHB, when you tell him that solution 1 will be up and running in 5 minutes, whereas solution 2 will be up and running in about 5 years, once the specification has been formalized and ratified by the UN security council.

      Which solution will the PHB choose I wonder ? Programming has always been a compromise, no one *really* expects that something they code today will still be around in 35 or 40 years, it's only occasionally that something *does* survive that long (COBOL legacy systems etc), and come and bite us in the ass when the new millenia arrives.

      Having said that, I wonder how many of the "buzzword" languages we see today will still be around in the next 40 years ? The concept of longevity might have been relevant in the 60's, these days it's more a case of a complete rewrite every year or so.

  9. Re:Future SMS by Runaway1956 · · Score: 4, Funny

    Should have fed them a politician. Al Gore comes to mind.

    Msge to fleet command: Avoid the 3rd rock, the inhabitants taste like shit!

    --
    "Windows is like the faint smell of piss in a subway: it's there, and there's nothing you can do about it." - Charlie Br