From 23fa8463e732b568c40066a9c01a6c220ffd1f3c Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 27 Apr 2022 10:47:10 +0800 Subject: [PATCH] * Fix bug #2611. --- module/report/control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/report/control.php b/module/report/control.php index 18b4576200..d39d43779b 100644 --- a/module/report/control.php +++ b/module/report/control.php @@ -57,8 +57,8 @@ class report extends control { $this->session->set('executionList', $this->app->getURI(true), 'execution'); - $begin = $begin ? date('Y-m-d', strtotime($begin)) : ''; - $end = $end ? date('Y-m-d', strtotime($end)) : ''; + $begin = date('Y-m-d', ($begin ? strtotime($begin) : time() - (date('j') - 1) * 24 * 3600)); + $end = date('Y-m-d', ($end ? strtotime($end) : time() + (date('t') - date('j')) * 24 * 3600)); $this->view->title = $this->lang->report->projectDeviation; $this->view->position[] = $this->lang->report->projectDeviation;