是什么导致了 2010 年的错误?

发布于 2024-08-17 01:16:04 字数 256 浏览 6 评论 0原文

有很多关于系统无法理解 2010 年的报告,但我不知道为什么。据我所知,我目前管理的系统运行良好,但我想知道实际问题是什么,以便更好地搜索。

有人可以解释一下吗?

编辑: http://www.rte.ie/business/2010/0105/ bug.html - 有关影响德国信用卡的信息

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

[浮城] 2024-08-24 01:16:05

银行和电信中使用的多种协议 - 包括 SMS 协议 - 将年份编码为 < a href="http://en.wikipedia.org/wiki/Binary-coded_decimal" rel="nofollow noreferrer">BCD 在一个字节中。

从 2000 年到 2009 年,人们很容易犯将年份解释为标准二进制数的错误,因为编码是相同的:

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

这很可能是 Windows Mobile 错误的原因。

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.

你是我的挚爱i 2024-08-24 01:16:05

一种可能的解释在下面的文章中

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

让我想起你最近关于廉价而肮脏的 Y2K bug 修复的文章,其中一些不道德的程序员放入了一个简单的 if <10 = 20xx,否则日期是 19xx

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

旧瑾黎汐 2024-08-24 01:16:05

SpamAssassin 有一条规则,将未来太远的日期标记为垃圾邮件:

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

修复晚了几天,但很简单:

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

十年后再见。

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.

忘年祭陌 2024-08-24 01:16:05

我正在使用一个使用一位数年份字段的系统。是的。一位数。所以这个系统失败的原因是“2000”与“2010”的表达方式相同。

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

零時差 2024-08-24 01:16:05

我听说的一个是人们在没有经过深思熟虑的情况下为千年虫问题所做的快速修复。所以如果 xx < 10 然后 20xx,否则 19xx。

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

舂唻埖巳落 2024-08-24 01:16:05

这可能是因为年轻的开发者在千禧年之后开始了他们的职业生涯,并使用 1 位数来代表年份。

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

堇色安年 2024-08-24 01:16:05

上周末,我在一个网站上处理了 2010 年的一个小故障,但这只是编码疏忽的结果。

有人认为,当列表仅包含 2009 年之前的项目时,将列表项的值设置为当前 dateTime.year.Now() 是个好主意。

ddlItem.findByText(DateTime.Now.Year.ToString())

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())
云裳 2024-08-24 01:16:05

以下是 Norton symantec Endpoint Protection 的屏幕截图

替代文本 http://img695.imageshack .us/img695/4500/152010112800am.jpg

真的很好,@symantec 没有人通知他们的客户...
直到文章发布: http://www.theregister.co.uk /2010/01/05/symantec_y2k10_bug/

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/

扛刀软妹 2024-08-24 01:16:05

组件中存在一个错误,将年份分为两部分。第二部分用于比较,因此数字 10 不是以 10 为基数,而是以 16 为基数,这意味着它是 0x10 = 16(十六进制)。

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

萌︼了一个春 2024-08-24 01:16:05

我使用 Google 代码搜索查找开源软件中的 2010 年错误。我寻找了一种表明存在错误的特定模式(使用“200%d”作为 printf 格式字符串),并发现了几个存在该错误的项目。搜索模式的创造性应用可能会发现更多不同类型的错误。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文