Skip to content

date: fix strftime O/E modifier parsing in C locale#11802

Open
Jah-yee wants to merge 1 commit intouutils:mainfrom
Jah-yee:pr/date-strftime-o-modifier
Open

date: fix strftime O/E modifier parsing in C locale#11802
Jah-yee wants to merge 1 commit intouutils:mainfrom
Jah-yee:pr/date-strftime-o-modifier

Conversation

@Jah-yee
Copy link
Copy Markdown

@Jah-yee Jah-yee commented Apr 14, 2026

Good day,

Thank you for your work on this project. I hope this small fix is helpful.
Please let me know if there's anything to adjust.

Warmly, RoomWithOutRoof

In C locale, the O (alternative numeric symbols) and E (alternative format)
modifiers should be ignored/stripped. However, they were being passed
through as literal text because they weren't recognized as flags.

This fix adds O and E to the recognized flag characters in
parse_format_spec(), so they're properly handled as modifiers
and stripped in C locale (as expected by GNU date).

Fixes: uutils#11656
@github-actions
Copy link
Copy Markdown

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/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/retry is no longer failing!
Note: The gnu test tests/tail/tail-n0f is now being skipped but was previously passing.
Congrats! The gnu test tests/cut/cut-huge-range 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.

1 participant