diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 8d9f91afaca..cda8494682b 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1144,6 +1144,7 @@ class Task extends CommonObject dol_syslog(get_class($this)."::addTimeSpent", LOG_DEBUG); $ret = 0; + $now = dol_now(); // Check parameters if (!is_object($user)) { @@ -1169,6 +1170,7 @@ class Task extends CommonObject $sql .= ", task_duration"; $sql .= ", fk_user"; $sql .= ", note"; + $sql .= ", datec"; $sql .= ") VALUES ("; $sql .= $this->id; $sql .= ", '".$this->db->idate($this->timespent_date)."'"; @@ -1177,6 +1179,7 @@ class Task extends CommonObject $sql .= ", ".$this->timespent_duration; $sql .= ", ".$this->timespent_fk_user; $sql .= ", ".(isset($this->timespent_note) ? "'".$this->db->escape($this->timespent_note)."'" : "null"); + $sql .= ", '".$this->db->idate($now)."'"; $sql .= ")"; $resql = $this->db->query($sql);