date: strip the O strftime modifier in the C locale - #13702
Open
igorgbr wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11656
In the C locale the
Ostrftime modifier requests alternative numericsymbols that do not exist, so GNU
datetreats it as a no-op:%Omrenders exactly like
%m. jiff does not know the modifier and emitted itliterally.
Strip the modifier from the format string before jiff sees it, mirroring
the existing
substitute_epoch_secondspass.%%is preserved so that anOfollowing a literal percent stays plain text.Before:
After (matches GNU):
The test for this behaviour already existed in
tests/by-util/test_date.rsmarked
#[ignore]; this PR removes the ignore.