正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
| @@ -66,7 +66,7 @@ class MonthReportController extends BaseController | @@ -66,7 +66,7 @@ class MonthReportController extends BaseController | ||
| 66 | } | 66 | } |
| 67 | // 创建指定年月的 DateTime 对象 | 67 | // 创建指定年月的 DateTime 对象 |
| 68 | $date = $this->map['month']; | 68 | $date = $this->map['month']; |
| 69 | - $start = new DateTime("$date-01 00:00:00"); | 69 | + $start = new \DateTime("$date-01 00:00:00"); |
| 70 | // 克隆 $start 对象并设置到下个月的第一天,减去1秒得到该月的最后一秒 | 70 | // 克隆 $start 对象并设置到下个月的第一天,减去1秒得到该月的最后一秒 |
| 71 | $end = (clone $start)->modify('last day of this month')->setTime(23, 59, 59); | 71 | $end = (clone $start)->modify('last day of this month')->setTime(23, 59, 59); |
| 72 | $startTime = $start->format('Y-m-d H:i:s'); | 72 | $startTime = $start->format('Y-m-d H:i:s'); |
-
请 注册 或 登录 后发表评论