From 10df66fddbf2f3e1511a26d6ec852a265254284d Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 23 Sep 2020 13:36:24 +0300 Subject: [PATCH] The "created" and "modified" consent fields are date time and they need a proper date time value --- application/models/Consents_model.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/application/models/Consents_model.php b/application/models/Consents_model.php index 5ee255a0..49d0e524 100644 --- a/application/models/Consents_model.php +++ b/application/models/Consents_model.php @@ -28,6 +28,8 @@ class Consents_model extends CI_Model { * @param array $consent Associative array with the consent's data. * * @return int Returns the consent ID. + * + * @throws Exception */ public function add($consent) { @@ -77,8 +79,8 @@ class Consents_model extends CI_Model { */ protected function insert($consent) { - $consent['created'] = time(); - $consent['modified'] = time(); + $consent['created'] = date('Y-m-d H:i:s'); + $consent['modified'] = date('Y-m-d H:i:s'); if ( ! $this->db->insert('consents', $consent)) { @@ -101,7 +103,7 @@ class Consents_model extends CI_Model { */ protected function update($consent) { - $consent['modified'] = time(); + $consent['modified'] = date('Y-m-d H:i:s'); if ( ! $this->db->update('consents', $consent, ['id' => $consent['id']])) {