FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

touch: Fix leap second year overflow by mtvb · Pull Request #14214 · uutils/coreutils · GitHub

touch: Fix leap second year overflow - #14214

Merged
sylvestre merged 1 commit into
uutils:mainfrom
mtvb:touch_year_overflow_fix
Aug 29, 2026
Merged

touch: Fix leap second year overflow#14214
sylvestre merged 1 commit into
uutils:mainfrom
mtvb:touch_year_overflow_fix

Conversation

mtvb commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Replaced the panicking dt += 1.second() with dt.checked_add(1.second()), mapping the overflow case to the same USimpleError/invalid date format error every other unparseable -t value already produces.

Fixes #14212

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/inotify-dir-recreate (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)
Note: The gnu test tests/cut/bounded-memory is now being skipped but was previously passing.

sylvestre merged commit 5b0d47a into uutils:main Aug 29, 2026
100 checks passed
mtvb deleted the touch_year_overflow_fix branch August 29, 2026 10:18
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

touch: -t with leap second near max representable year panics

2 participants


Back | FazBrowse Home | New Git URL