top-think / think-orm

Think ORM——the PHP Database&ORM Framework
Apache License 2.0
413 stars 171 forks source link

whereMonth 获取月份异常 #507

Closed hongfs closed 2 months ago

hongfs commented 10 months ago

当前日期为 31 号,strtotime('last month') 获取的并不是上一个月的时间,而是本月的时间。

https://stackoverflow.com/questions/9058523/php-date-and-strtotime-return-wrong-months-on-31st

codecov-commenter commented 10 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 12.24%. Comparing base (7b0b8ea) to head (aba7264). Report is 25 commits behind head on 3.0.

Files Patch % Lines
src/db/concern/TimeFieldQuery.php 0.00% 2 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 3.0 #507 +/- ## ============================================ - Coverage 12.24% 12.24% -0.01% - Complexity 2965 2966 +1 ============================================ Files 64 64 Lines 7128 7130 +2 ============================================ Hits 873 873 - Misses 6255 6257 +2 ``` | [Flag](https://app.codecov.io/gh/top-think/think-orm/pull/507/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=top-think) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/top-think/think-orm/pull/507/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=top-think) | `12.24% <0.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=top-think#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.