uutils/coreutils

Date rejects valid large years that GNU date accepts

Open

#9,774 创建于 2025年12月22日

在 GitHub 查看
 (6 评论) (0 反应) (0 负责人)Rust (1,852 fork)batch import
U - datefuzzinggood first issue

仓库指标

Star
 (23,246 star)
PR 合并指标
 (平均合并 5天 23小时) (30 天内合并 239 个 PR)

描述

GNU:

  $ LANG=C TZ=UTC0 /usr/bin/date -d "18978-01-01"
  Thu Jan  1 00:00:00 UTC 18978

Rust:

  $ LANG=C TZ=UTC0 ./target/debug/date -d "18978-01-01"
  date: invalid date '18978-01-01'
  • GNU date: Accepts year 18978 and outputs the date correctly
  • Rust date: Rejects year 18978 as invalid date, appears to have a limit around year 9999
  • GNU date supports much larger year ranges than our implementation

Found with a fuzzer

贡献者指南