Skip to content

date: width prefix in %N format specifier is ignored ( %3N, %6N always output full 9 nanosecond digits) #12001#12010

Merged
cakebaker merged 7 commits intouutils:mainfrom
Devel08:fix-issue-12001
Apr 27, 2026
Merged

date: width prefix in %N format specifier is ignored ( %3N, %6N always output full 9 nanosecond digits) #12001#12010
cakebaker merged 7 commits intouutils:mainfrom
Devel08:fix-issue-12001

Conversation

@Devel08
Copy link
Copy Markdown
Contributor

@Devel08 Devel08 commented Apr 26, 2026

this PR closes #12001.
the %N format specifier was ignored when the default width value was greater than the specified one.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 26, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/basenc/bounded-memory is now being skipped but was previously passing.
Congrats! The gnu test tests/unexpand/bounded-memory is now passing!
Skip an intermittent issue tests/pr/bounded-memory (was skipped on 'main', now failing)

@Devel08 Devel08 marked this pull request as draft April 26, 2026 09:46
@Devel08 Devel08 marked this pull request as ready for review April 26, 2026 10:20
@Devel08
Copy link
Copy Markdown
Contributor Author

Devel08 commented Apr 26, 2026

Ready for review, however I found a small issue that is not connected to that Issue. GNU coreutils handles negative numbers such as +%mN where m is a negative number. I may open an issue about that when that one is resolved. Perhaps width should be isize and and effective_width should be the absolute value of width, so that it behaves like GNU coreutil does?

@cakebaker cakebaker merged commit 5fa0aba into uutils:main Apr 27, 2026
169 checks passed
@cakebaker
Copy link
Copy Markdown
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

date: width prefix in %N format specifier is ignored ( %3N, %6N always output full 9 nanosecond digits)

2 participants