Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util/timeutil: Ensure exponents are never encoded into the output String() #4123

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

mastercactapus
Copy link
Member

@mastercactapus mastercactapus commented Nov 8, 2024

Description:
Fixes a bug where sometimes the SecondsPart of ISODuration would result in an encoded exponent and produce a string that is not a valid ISO 8601 duration.

- Use `strconv.FormatFloat` for consistent output
- Add tests for rounding and formatting edge cases
@mastercactapus mastercactapus merged commit 02e6f88 into master Nov 8, 2024
7 checks passed
@mastercactapus mastercactapus deleted the fix-iso-duration-string branch November 8, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants