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

refactor: replace time() with Time into date_helper and Email class #6852

Merged
merged 4 commits into from Nov 14, 2022

Conversation

ping-yee
Copy link
Contributor

Description
See #6815

Checklist:

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

@ping-yee
Copy link
Contributor Author

This is off topic, I have a question that what function in time class replace the microtime() in system/Debug/Toolbar/Collectors/Database.php is more appropriate?

@ddevsr ddevsr added the refactor Pull requests that refactor code label Nov 13, 2022
@kenjis
Copy link
Member

kenjis commented Nov 13, 2022

Since PHP 7.1, DateTimeImmutable has microseconds when constructed from the current time, either explicitly or with a relative string (e.g. "first day of next month").
See https://www.php.net/manual/en/migration71.incompatible.php#migration71.incompatible.datetime-microseconds

We can use u in format:
See https://www.php.net/manual/en/datetime.format.php

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@MGatner MGatner merged commit 3a9ed0e into codeigniter4:develop Nov 14, 2022
@ping-yee ping-yee deleted the refactor-replace-time-email branch April 25, 2023 07:30
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.

None yet

4 participants