From a6584913955a3d075f8b6c0700fbcec387eee2e0 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Tue, 23 Aug 2022 15:57:06 +0800 Subject: [PATCH] * fix bug #65904 --- module/programplan/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/programplan/model.php b/module/programplan/model.php index 2119433318..61d186ffdf 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -205,7 +205,7 @@ class programplanModel extends model $data->textColor = $this->lang->execution->gantt->stage->textColor; $data->bar_height = $this->lang->execution->gantt->bar_height; - if($data->endDate > $data->start_date) $data->duration = helper::diffDate($data->endDate, $data->start_date) + 1; + if($data->endDate > $data->start_date) $data->duration = helper::diffDate(substr($data->endDate, 0, 10), substr($data->start_date, 0, 10)) + 1; if($data->start_date) $data->start_date = date('d-m-Y', strtotime($data->start_date)); if($data->start_date == '' or $data->endDate == '') $data->duration = 1; @@ -294,7 +294,7 @@ class programplanModel extends model $data->owner_id = join(',', $assigneds); } - if($data->endDate > $data->start_date) $data->duration = helper::diffDate($data->endDate, $data->start_date) + 1; + if($data->endDate > $data->start_date) $data->duration = helper::diffDate(substr($data->endDate, 0, 10), substr($data->start_date, 0, 10)) + 1; if($data->start_date) $data->start_date = date('d-m-Y', strtotime($data->start_date)); if($data->start_date == '' or $data->endDate == '') $data->duration = 1;