DateTime::subtract fails when nanosecond result crosses midnight
維護者通常 1 天內回覆
已經有一個關聯 PR 被合併了。
- #1724 來自 @fglock —— 已合併
評估
研究方向
The failure is in DateTime 1.67's t/10subtract.t at line 156, where subtracting one nanosecond from midnight passes nanosecond => -1 into DateTime validation. Start by running that focused test on the PerlOnJava JVM and interpreter backends and compare with system Perl. Done means the test passes on both backends. Linked PR #1724 is already open against this issue, so check it before starting.
由索引模型根據 Issue 內容生成。
描述
Summary
DateTime::subtract fails when a subtraction crosses midnight by one nanosecond. It passes nanosecond => -1 into DateTime's validation instead of normalizing the result to the previous second/day.
Reproduction
DateTime 1.67's t/10subtract.t reaches the failing case at line 156, subtracting one nanosecond from midnight. PerlOnJava aborts after the preceding 37 assertions with an invalid nanosecond error.
The focused test passes with system Perl 5.45.4 (perl5/perl) and DateTime's full 1.67 suite passes on that oracle. The focused test fails on both PerlOnJava execution backends: JVM and interpreter.
This was observed during CPAN release acceptance run 20261009-194921-60036.
Impact
The failure is in DateTime's pure-Perl subtraction path. DateTime currently has about 950 unique runtime reverse dependants (558 with recent CPAN releases), including Monitoring-Sneck, Travel-Status-MOTIS, BarefootJS, App-ElasticSearch-Utilities, Test2-Harness-UI, and Dist-Zilla.
Other DateTime failures in this acceptance run involve goto from a sort comparator and are tracked separately in #1634; this issue is only for nanosecond normalization.
- 主要語言
- Perl
- 星號
- 65
- 分支
- 8
- 平均合併
- 5 小時 49 分鐘
- 30 天內合併 PR
- 177
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
fglock/PerlOnJava 的其他 Issue
-
area:runtime documentation enhancement
難度 2/5 1-3 小時 新手友好度 72/100
fglock/PerlOnJava#1579 ·
維護者通常 1 天內回覆
-
Autovivify undefined hash reference in list assignment可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉area:runtime bug
難度 4/5 1-2 天 新手友好度 55/100
fglock/PerlOnJava#1958 · 1 則留言 ·
維護者通常 1 天內回覆
-
area:io bug
難度 4/5 3-5 天 新手友好度 56/100
fglock/PerlOnJava#1957 · 2 則留言 ·
維護者通常 1 天內回覆
-
area:cpan-port enhancement
難度 5/5 一週以上 新手友好度 25/100
fglock/PerlOnJava#1955 ·
維護者通常 1 天內回覆
-
area:runtime bug
難度 4/5 3-5 天 新手友好度 22/100
fglock/PerlOnJava#1951 ·
維護者通常 1 天內回覆
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
wave-followup
難度 2/5 1-3 小時 新手友好度 74/100
-
documentation
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
virtualmin/virtualmin-gpl#1322 ·
-
`singletitle`/`uniquetitle`/`uniquework` only ignore entries whose `options` field contains the literal token `skipbib`; `skipbib=true` and `dataonly` still count可能已有人在做 @plk 於 2 天前認領。 未關閉Bug fixedindev
難度 2/5 1-3 小時 新手友好度 72/100
-
easy first-contributor first-contributors good first issue help wanted perl shell up-for-grabs
難度 1/5 1 小時以內 新手友好度 88/100
fork-commit-merge/fork-commit-merge#8461 ·
維護者通常 1 天內回覆