Skip to content

Fix military date parsing not adjusting date - #9785

Merged
sylvestre merged 14 commits into
uutils:mainfrom
cerdelen:fix_date_military_parsing
Jan 1, 2026
Merged

Fix military date parsing not adjusting date#9785
sylvestre merged 14 commits into
uutils:mainfrom
cerdelen:fix_date_military_parsing

Conversation

@cerdelen

@cerdelen cerdelen commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

fixes #9775.

I fixed the bug described in this issue and also added regression tests.

I am pretty sure that the unwrap i added is not okay but i am not sure what fallback date to use if the edgecases of the time is reached and would love for someone to give me some input.

@codspeed-hq

codspeed-hq Bot commented Dec 22, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #9785 will not alter performance

Comparing cerdelen:fix_date_military_parsing (374d880) with main (911bc15)

Summary

✅ 136 untouched
⏩ 24 skipped1

Footnotes

  1. 24 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/tail/retry. tests/tail/retry is passing on 'main'. Maybe you have to rebase?

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/tty/tty-eof. tests/tty/tty-eof is passing on 'main'. Maybe you have to rebase?

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

Comment thread src/uu/date/src/date.rs
Comment thread src/uu/date/src/date.rs
Comment thread src/uu/date/src/date.rs Outdated
Comment thread src/uu/date/src/date.rs Outdated
cerdelen and others added 2 commits December 23, 2025 10:44
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/sort/sort-stale-thread-mem. tests/sort/sort-stale-thread-mem is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/csplit/csplit-heap is now being skipped but was previously passing.
Note: The gnu test tests/printf/printf-surprise is now being skipped but was previously passing.

@cerdelen

Copy link
Copy Markdown
Contributor Author

also fixes #9798

@sylvestre

Copy link
Copy Markdown
Contributor

@cerdelen could you please update this PR with the test cases from #9798 ?
thanks

Comment thread src/uu/date/src/date.rs
@cerdelen

cerdelen commented Dec 24, 2025

Copy link
Copy Markdown
Contributor Author

@cerdelen could you please update this PR with the test cases from #9798 ? thanks

line 1117 in file tests/by-util/test_date.rs already tests this explicitly for correct time

and i extended my test with this variation too to checks that the date is correct

@cerdelen

Copy link
Copy Markdown
Contributor Author

@sylvestre is the 1 failing Pipeline maybe flakey. Its some test with 'more'? So i have to investigate this failed Pipeline or is it okay?

@sylvestre

Copy link
Copy Markdown
Contributor

Don't hesitate to investigate :)
In a different pr

@cerdelen

Copy link
Copy Markdown
Contributor Author

Is there anything else needed for this PR before it can be merged into the repository?

Comment thread tests/by-util/test_date.rs Outdated
Comment thread tests/by-util/test_date.rs Outdated
Comment thread src/uu/date/src/date.rs Outdated
Comment thread src/uu/date/src/date.rs Outdated
@cerdelen
cerdelen requested a review from sylvestre January 1, 2026 10:52
Comment thread src/uu/date/src/date.rs
Comment thread src/uu/date/src/date.rs Outdated
Comment thread src/uu/date/src/date.rs Outdated
Comment thread src/uu/date/src/date.rs Outdated
@cerdelen
cerdelen requested a review from sylvestre January 1, 2026 20:31
@sylvestre
sylvestre merged commit 84e6f03 into uutils:main Jan 1, 2026
129 checks passed
@cerdelen
cerdelen deleted the fix_date_military_parsing branch January 24, 2026 13:20
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.

Military timezone parsing shows incorrect date (1 day ahead)

2 participants