Skip to content

date: treat empty --file lines as midnight today like GNU - #14673

Open
Dummy-pixel-hash wants to merge 1 commit into
uutils:mainfrom
Dummy-pixel-hash:date-file-empty-midnight
Open

Dummy-pixel-hash wants to merge 1 commit into
uutils:mainfrom
Dummy-pixel-hash:date-file-empty-midnight

Conversation

@Dummy-pixel-hash

Copy link
Copy Markdown
Contributor

Fixes #14498.

Empty, whitespace-only, and lone - lines in --file/stdin input printed the current time; GNU treats them as midnight today. This normalizes such lines to midnight, mirroring the existing -d handling.

Empty, whitespace-only, and lone "-" lines in --file/stdin input
printed the current time instead of midnight. Normalize them to
midnight, mirroring the existing -d handling.

Fixes uutils#14498.
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tty-eof (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/unexpand/bounded-memory is now passing!

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: --file flag outputs different date on EOF of empty file in stdin mode

1 participant