core/MY_Model.php
public function created_at($row)
    {
        if (is_object($row))
        {
            $row->created_at = date('Y-m-d H:i:s');
        }
        else
        {
            $row['created_at'] = date('Y-m-d H:i:s');
        }

        return $row;
    }
public function created_at($row)
    {
        if (is_object($row))
        {
            $row->created_at = date('Y-m-d H:i:s');
        }
        else
        {
            $row['created_at'] = date('Y-m-d H:i:s');
        }

        return $row;
    }
public function created_at ( $ row ) { if ( is_object ( $ row ) ) { $ row -> created_at = date ( 'Y-m-d H:i:s' ) ; } else { $ row [ 'created_at' ] = date ( 'Y-m-d H:i:s' ) ; } return $ row ; }
MySQL DATETIME created_at and updated_at
MySQL DATETIME created_at and updated_at