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