08 September 2022
How to create a Y2K-like problem for no good reason
I have painful memories of the Y2K problem - as a technology consultant in the 1990s - but did not expect to hit another externally-imposed date issue in my lifetime – until yesterday, that is.
Background: my team maintains a hugely-complex open-source framework. Each time we build a version we run many thousands of automated unit tests, and many hundreds of automated end-to-end tests, simulating a user interacting with the system through a browser. Occasionally they fail from a new error in our own code, but they most commonly fail as a result of updates to any one of thousands of independently-managed packages in the software ‘ecosystem’ that ours depends upon – the whole thing would be unworkable without these tests to provide confidence. We also routinely test in at least two different ‘locales’ – another common source of issues.
Yesterday, after just such an upgrade to third-party packages, our tests all passed on the cloud-based build server, but then failed when we ran them locally (usually it happens the other way around because we do all development in the UK). It took some hours to find what the problem was and it turned out to be date formatting.
Now in our system, all displayed dates are formatted using the long-established and well-supported standard of dd-MMM-yyyy which results in e.g 07-Feb-2022 in UK browsers, or 07-Fev-2022 in France. But yesterday the date was being generated as 08-Sept-2022 – i.e. with four characters for the month. Surprisingly, though, dates in other months were still be rendered with three-letters for the month as expected. At first, we thought this was a bug in the new version of someone else’s code, but further investigation revealed that the change was deliberate.
Apparently, the Common Locale Data Repository, managed by the Unicode Consortium, has decided that Sep is no longer a valid abbreviation for September, and has changed it to Sept. Why? Sep is not ambiguous in English, nor, to the best of my knowledge does it carry any politically-incorrect overtone, or rude meaning. And, at least according to hyphenator.net, it is still acceptable to hyphenate ‘September’ after the ‘p’.
Many big commercial systems don’t have anything like the degree of automated testing that we have built up, and so the change may go unobserved for a long time. While the consequences of this change would seem unlikely to be as catastrophic as those predicted for Y2K (though the latter didn’t materialise, even in countries that paid little attention to the warnings). But they can still be substantial. Consider a data report with a column of dates, for example. The programmer specified dd-MMM-yyyy on the clear understanding that every date (for the next 8000 years) would be 11 characters wide. Now all dates in the month of September only will be 12 characters wide. Columns of dates will no longer be well-aligned and, worse, the new date format might not even fit into fields on printed or screen forms designed for 11 characters.
Someone, somewhere, doesn’t have enough to do – combined with an inability or disinclination to think through the consequences of their actions. Y2K was more understandable – no one created it deliberately, and few business decisions look several decades ahead.
Discussion
Please login to post a comment
Thank you - that’s a nice example for my Y12s to look at. How infuriating!