bug(date): when using `-d` option, it trusts the weekday
Open
Nobody has claimed this yet.
U - date
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Hi, uutils mainteners
our testing confirms the uu date command trusts Wednesday august 17 and returns it, while the gnu one it ignores the weekday
and say Monday which correct, august 17 in Monday
relunsec@relunsec:~/software/coreutils/target/debug$ gnudate -d "WEDNESDAY August 17" --debug
date: parsed day part: Wed (day ordinal=0 number=3)
date: parsed date part: (Y-M-D) 2026-08-17
date: input timezone: system default
date: warning: using midnight as starting time: 00:00:00
date: warning: day (Wed) ignored when explicit dates are given
date: starting date/time: '(Y-M-D) 2026-08-17 00:00:00'
date: '(Y-M-D) 2026-08-17 00:00:00' = 1786939200 epoch-seconds
date: timezone: system default
date: final: 1786939200.000000000 (epoch-seconds)
date: final: (Y-M-D) 2026-08-17 04:00:00 (UTC)
date: final: (Y-M-D) 2026-08-17 00:00:00 (UTC-04)
gnudate: output format: ‘%a %b %e %r %Z %Y’
Mon Aug 17 12:00:00 AM EDT 2026
relunsec@relunsec:~/software/coreutils/target/debug$ ./date -d "WEDNESDAY August 17" --debug
date: input string: WEDNESDAY August 17
date: parsed date part: (Y-M-D) 2026-08-19
date: parsed time part: 00:00:00
date: input timezone: system default
date: warning: using midnight as starting time: 00:00:00
Wed Aug 19 12:00:00 AM EDT 2026
relunsec@relunsec:~/software/coreutils/target/debug$
as i sad, gnu date it ignores the weekday in explicit dates while the uu one just returns wednesday august 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the uu date command using -d "WEDNESDAY August 17" --debug, then trace the date-input parsing path. Compare the result with GNU date: when an explicit date is given, the weekday should be ignored, so the command should resolve August 17 rather than August 19.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100