2157 年 2 月 31 日这个日期有何意义?
我在大型 IT 支持环境中工作。现在我们已经两次看到无效日期 02/31/2157 被插入到 Oracle DATE
列中。到目前为止,我还无法重现此问题,但当用户尝试将“00/00/0000”保存到列中时,它似乎偶尔会发生。我相信该值源自 PowerBuilder DataWindow 更新。
该应用程序使用无数的库来实现各种技术,因此这个问题可能有点模糊,但是...
有没有人在某些已建立的库中看到过日期 02/31/2157,当其他无效日期出现时,Oracle 可能会默认该日期进入?也许是类似于 1970 年 1 月 1 日的时间开始日期的时间结束概念?
I work in a large scale IT support environment. Twice now we have seen an invalid date of 02/31/2157 being inserted in an Oracle DATE
column. So far I have not been able to reproduce this problem, but it appears to be happening occasionally when a user attempts to save '00/00/0000' into the column. I believe the value is originating from a PowerBuilder DataWindow update.
The application uses myriad libraries for all sorts of technologies, so this question may be a bit vague, but...
Has anyone seen the date 02/31/2157 in some established library that Oracle could be defaulting to when some other invalid date is entered? Perhaps an end-of-time concept analogous to the beginning-of-time date of 1/1/1970?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
来自 http://download.oracle.com/文档/cd/B19306_01/server.102/b14220/datatype.htm#i1847"
2157-256 = 1901,这似乎可疑地接近可能的纪元 1/1/1900(或 12/13/1901 - 这是 2038 年问题)
我猜测它在日期字节中存储 0x00 或 0xFF,然后在解码时感到困惑。 (它如何处理 255 月份?)
From http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#i1847"
2157-256 = 1901, which seems suspiciously close to a possible epoch of 1/1/1900 (or 12/13/1901 - which is the rollover date for the Year 2038 Problem)
I'd guess that it is storing either 0x00 or 0xFF in the date bytes, then getting confused when it decodes it. (How does it deal with month 255?)
事实证明这是一个 powerbuilder 问题。该字段在数据窗口中创建为必需,但在保存之前以编程方式更改为非必需。因此,空值被保存到非空数据库列中,并且 powerbuilder 插入了一些虚拟日期,而不是仅仅抛出错误。
Turns out this was a powerbuilder issue. The field was created in the datawindow as required, but was programmatically changed to be non-required before saving. So a null value was being saved to a non-null database column, and powerbuilder inserted some dummy date instead of just throwing an error.
我记得在保存无效日期时得到了一个奇怪的值。 IIRC 它是在 PB 9 中,我们必须为其获得 EBF。这是日期编辑掩码的问题,并且输入了未被拒绝的无效日期。抱歉我没有更多细节。
I remember getting a weird value when saving an invalid date. IIRC it was in PB 9 and we had to get an EBF for it. It was a problem with Date Editmasks and entering an invalid date that wasn't rejected. Sorry I don't have more details.