Skip to content

Conversation

@michalsn
Copy link
Member

Description
The U.u format is already providing us the correct format (6-digits). And with sprintf, the comma separator may be transformed either to . or , depending on locale (LC_NUMERIC).

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn added the refactor Pull requests that refactor code label Jan 10, 2026
@paulbalandan
Copy link
Member

Is there a downside to just using the capital F specifier?

Co-authored-by: John Paul E. Balandan, CPA <[email protected]>
@michalsn
Copy link
Member Author

Yes, you're right - updated.

@neznaika0
Copy link
Contributor

A microtime() is being used, yes, these are tests, I'll just note

$this->time = (float) sprintf('%.6f', microtime(true));

$path = str_replace((string) $time, sprintf('%.6f', $time - self::STEP), $path);

@michalsn
Copy link
Member Author

Microtime is not a problem in this case, as it's only used to generate historical entries, but I updated formatting - thanks.

@michalsn michalsn merged commit c307c5f into codeigniter4:develop Jan 10, 2026
49 checks passed
@michalsn
Copy link
Member Author

Thank you everyone for the suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Pull requests that refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants