From 3dd9d47089271e26a20f9cb0a69375e37df4e64f Mon Sep 17 00:00:00 2001 From: Sean Wang Date: Thu, 29 Mar 2018 14:49:06 +0800 Subject: [PATCH] Fix wrong approve time in expense report The approve time showed was 8 hours more than the real time. Checking database turned out that it had the wrong data(+8 hours). After checking every timezone related settings were correct, I found that it do twice idate() in setApproved(). Since we have idate() in $sql, we don't need the idate() at the line 1249. --- htdocs/expensereport/class/expensereport.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 9f51b04a1f1..c2eacf4aa76 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1246,7 +1246,7 @@ class ExpenseReport extends CommonObject $error = 0; // date approval - $this->date_approve = $this->db->idate($now); + $this->date_approve = $now; if ($this->fk_statut != 5) { $this->db->begin();