uutils/coreutils

Date rejects valid large years that GNU date accepts

Geschlossen

#9.774 geöffnet am 22.12.2025

 (6 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (1.976 Forks)batch import
U - datefuzzinggood first issue

Repository-Metriken

Stars
 (23.854 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 5T 23h) (239 gemergte PRs in 30 T)

Beschreibung

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

Contributor Guide