The "created" and "modified" consent fields are date time and they need a proper date time value
This commit is contained in:
parent
ed262c2e9a
commit
10df66fddb
1 changed files with 5 additions and 3 deletions
|
@ -28,6 +28,8 @@ class Consents_model extends CI_Model {
|
||||||
* @param array $consent Associative array with the consent's data.
|
* @param array $consent Associative array with the consent's data.
|
||||||
*
|
*
|
||||||
* @return int Returns the consent ID.
|
* @return int Returns the consent ID.
|
||||||
|
*
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function add($consent)
|
public function add($consent)
|
||||||
{
|
{
|
||||||
|
@ -77,8 +79,8 @@ class Consents_model extends CI_Model {
|
||||||
*/
|
*/
|
||||||
protected function insert($consent)
|
protected function insert($consent)
|
||||||
{
|
{
|
||||||
$consent['created'] = time();
|
$consent['created'] = date('Y-m-d H:i:s');
|
||||||
$consent['modified'] = time();
|
$consent['modified'] = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
if ( ! $this->db->insert('consents', $consent))
|
if ( ! $this->db->insert('consents', $consent))
|
||||||
{
|
{
|
||||||
|
@ -101,7 +103,7 @@ class Consents_model extends CI_Model {
|
||||||
*/
|
*/
|
||||||
protected function update($consent)
|
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']]))
|
if ( ! $this->db->update('consents', $consent, ['id' => $consent['id']]))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue