public function now($type = 'datetime')
    {
        if ($type === 'datetime') {
            return $this->_build('NOW')->setReturnType('datetime');
        }
        if ($type === 'date') {
            return $this->_build('CURRENT_DATE')->setReturnType('date');
        }
        if ($type === 'time') {
            return $this->_build('CURRENT_TIME')->setReturnType('time');
        }
    }
public function now($type = 'datetime')
    {
        if ($type === 'datetime') {
            return $this->_build('NOW')->setReturnType('datetime');
        }
        if ($type === 'date') {
            return $this->_build('CURRENT_DATE')->setReturnType('date');
        }
        if ($type === 'time') {
            return $this->_build('CURRENT_TIME')->setReturnType('time');
        }
    }
public function now ( $ type = 'datetime' ) { if ( $ type === 'datetime' ) { return $ this -> _build ( 'NOW' ) -> setReturnType ( 'datetime' ) ; } if ( $ type === 'date' ) { return $ this -> _build ( 'CURRENT_DATE' ) -> setReturnType ( 'date' ) ; } if ( $ type === 'time' ) { return $ this -> _build ( 'CURRENT_TIME' ) -> setReturnType ( 'time' ) ; } }
Returns a FunctionExpression representing a call that will return the current
date and time. By default it returns both date and time, but you can also
make it generate only the date or only the time.

@param string $type (datetime|date|time)
@return \Cake\Database\Expression\FunctionExpression
Returns a FunctionExpression representing a call that will return the current date and time . By default it returns both date and time but you can also make it generate only the date or only the time .