Monday, January 18, 2010

Problem 2016 hits Canadian Gas Station

I took my car to the wash today and while waiting in line - stared at the receipt with the car wash code. You know, these fully automatic, touch-less carwash where the only touching one has to do is to key in the “wash code” from the receipt at the washing chamber entrance.

The expiry date for the ticket 16/07/16!!! Well… maybe it’s a SUNCO policy to sell car wash tickets with 6.5 years expiry, but extremely unlikely. 16th month? Well… that may be explained by the fact that DD/MM/YY date format is OK in Canada (not in the US)...

Bug 2016 aka y2k16 was previously reported in Aussie POS and Cell phone operations (Windows Mobile users received SMS messages dated year 2016).

Now we have it at Canadian Gas Station.

Either case does not have the official explanation yet, but most probable one – some “smart” developer just arbitrary converted HEX number into Decimal and back as a string. Literally taking last two characters of the number and stuffing them into another format.

Hex 0x01 is 01 in decimal
Hex 0x09 is 09 in decimal
Hex 0x10 is 16, not 10 in decimal.

So if you’ll try to convert years 00..09 – it works just fine, but fails miserably with year 10, translating it into 16!

No comments: