uutils / uutils/coreutils

bug(date): when using -f which a file contains "j" or "9j" or any military time that ends with j, it rejected

Open
#12,893 0 comments 0 reactions 0 assignees View on GitHub

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

that was a big issue undiscovered in the date command, i discovered when putting a miliatry date in dates.txt file by example
will be rejected which normally accepted with -d 9j or -d j directly

relunsec@relunsec:~/software/coreutils/target/debug$ echo "9j" > dates.txt
relunsec@relunsec:~/software/coreutils/target/debug$ ./date -f dates.txt 
date: invalid date '9j'
relunsec@relunsec:~/software/coreutils/target/debug$ echo "j" > dates.txt
relunsec@relunsec:~/software/coreutils/target/debug$ ./date -f dates.txt 
date: invalid date 'j'
relunsec@relunsec:~/software/coreutils/target/debug$ 

it needs to be fixed, that is the issue left undiscovered for years

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the date command's handling of -f input and compare it with direct -d parsing for values such as "j" and "9j". Reproduce the failure using dates.txt, then add coverage showing that military times ending in j are accepted from file input as they are from direct arguments.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.