Skip to content

Date parse datetime 0.15 fixes#13284

Open
sylvestre wants to merge 3 commits into
uutils:mainfrom
sylvestre:date-parse_datetime-0.15-fixes
Open

Date parse datetime 0.15 fixes#13284
sylvestre wants to merge 3 commits into
uutils:mainfrom
sylvestre:date-parse_datetime-0.15-fixes

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

No description provided.

sylvestre added 3 commits July 5, 2026 17:40
parse_datetime 0.15 returns ParsedDateTime instead of jiff::Zoned;
unwrap the in-range value via into_zoned() at the call sites and treat
out-of-range (Extended) years as unparseable input.
jiff renders %s by truncating toward zero, but GNU date floors toward
negative infinity (e.g. `@-1.5` -> -2, not -1). Every other field jiff
produces already matches GNU, so rewrite only the %s specifier to the
floored epoch second (via parse_datetime's unix_epoch_second) before
handing the format string to jiff.

Fixes uutils/parse_datetime#283
parse_datetime 0.15 accepts a 12-hour meridiem suffix on a combined
date+time (e.g. `2024-06-15 12:00 PM`); enable and extend the
previously-ignored regression test.

Fixes uutils/parse_datetime#282
@sylvestre sylvestre force-pushed the date-parse_datetime-0.15-fixes branch from 0152e69 to 7d526cb Compare July 5, 2026 19:21
@github-actions

github-actions Bot commented Jul 5, 2026

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)
Skip an intermittent issue tests/tail/retry (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)
Skipping an intermittent issue tests/tail/symlink (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/pipe-f is now passing!
Skip an intermittent issue tests/pr/bounded-memory (was skipped on 'main', now failing)
Skip an intermittent issue tests/tail/tail-n0f (was skipped on 'main', now failing)

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