uutils / uutils/coreutils

bug(date): when using like +%50c and +%50x it produces padding 0s overlapping

Open
#12,897 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 is s formatting issue our test confirms

relunsec@relunsec:~/software/coreutils/target/debug$ ./date "+%50c"
00000000000000000000000000Mon Jun 15 04:32:51 2026
relunsec@relunsec:~/software/coreutils/target/debug$ gnudate "+%50c"
                   Mon 15 Jun 2026 04:32:54 AM EDT
relunsec@relunsec:~/software/coreutils/target/debug$ 

look gnu one correctly formatted it, correctly while the uu one just putted 0s overlapping to each others

and also what happend with +%50x and +%50X too

relunsec@relunsec:~/software/coreutils/target/debug$ ./date "+%50x"
00000000000000000000000000000000000000000006/15/26
relunsec@relunsec:~/software/coreutils/target/debug$ gnudate "+%50x"
                                        06/15/2026
relunsec@relunsec:~/software/coreutils/target/debug$ ./date "+%50X"
00000000000000000000000000000000000000000004:43:55
relunsec@relunsec:~/software/coreutils/target/debug$ gnudate "+%50X"
                                       04:44:00 AM
relunsec@relunsec:~/software/coreutils/target/debug$ 

and with +%50r too

relunsec@relunsec:~/software/coreutils/target/debug$ ./date "+%50r"
00000000000000000000000000000000000000004:46:54 AM
relunsec@relunsec:~/software/coreutils/target/debug$ 

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 by reproducing the date command examples for +%50c, +%50x, +%50X, and +%50r, then locate the date format handling entry point. Compare the output with GNU date and verify that width padding uses spaces rather than overlapping zeroes for all four formats.

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.