mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 07:52:29 +03:00
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.
|
||||
*
|
||||
* @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']]))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue