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

Fix microseconds formatting #389

Merged
merged 1 commit into from
May 8, 2018
Merged

Fix microseconds formatting #389

merged 1 commit into from
May 8, 2018

Conversation

fsabe
Copy link
Contributor

@fsabe fsabe commented Oct 27, 2017

This fix formatting fractional seconds with leading zeroes (issue #388) and change the format of microseconds when using %f to conform with what's documented:

%f - microseconds in zero padded decimal form, i.e. 025000

Please see the changed tests. I'd like to hear some thoughts on whether the precision should be taken into account when formatting microseconds.

Summary of changes

  • Pad with zeroes before truncating when formating fractional seconds;
  • Pad with zeroes and never truncate when formatting with %f.

- Pad with zeroes before truncating when formating fractional seconds;
- Pad with zeroes and never truncate when formatting with %f.
@coveralls
Copy link

coveralls commented Oct 27, 2017

Coverage Status

Coverage increased (+0.1%) to 68.098% when pulling 7f27d30 on fsabe:format-us into c86a96a on bitwalker:master.

@bitwalker
Copy link
Owner

Thanks for the fix!

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.

3 participants