Skip to content

Conversation

@3v1n0
Copy link
Contributor

@3v1n0 3v1n0 commented Nov 21, 2025

In case a string such as "now + 1.5 seconds" was parsed we were failing.

This happened because after processing now, the parser was getting to the point in which the string contained "+ 1.5", and once the sign was processed, the remaining " 1.5" string conained a space that was causing sec_and_nsec to fail.

Instead of failing at this point, just strip the spaces after the sign has been processed.

Note in fact that "0+0.0 seconds" was working fine

Closes: uutils/coreutils#8618

@3v1n0 3v1n0 force-pushed the fix-parsing-relative-times branch 2 times, most recently from befcdd3 to 8405042 Compare November 21, 2025 05:36
In case a string such as "now + 1.5 seconds" was parsed we were failing.

This happened because after processing now, the parser was getting
to the point in which the string contained "+ 1.5", and once the sign
was processed, the remaining " 1.5" string conained a space that was
causing sec_and_nsec to fail.

Instead of failing at this point, just strip the spaces after the sign has
been processed.

Note in fact that "0+0.0 seconds" was working fine

Closes: uutils/coreutils#8618
@3v1n0 3v1n0 force-pushed the fix-parsing-relative-times branch from 8405042 to d6ab892 Compare November 21, 2025 05:37
@cakebaker cakebaker merged commit 31b8e58 into uutils:main Nov 21, 2025
17 checks passed
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (9f6605f) to head (d6ab892).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #246   +/-   ##
===========================
===========================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cakebaker
Copy link
Collaborator

Thanks for your PR!

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.

date: Does not accept decimal offsets

2 participants