protected function _formatDate($field, &$attributes)
    {
        if ($this->timestamps && $field) {

            switch ($this->dateFormat) {
                case 'datetime':
                    $dateFormat = date("Y-m-d H:i:s");
                    break;
                
                case 'unixtime':
                default:
                    $dateFormat = time();
                    break;
            }
            
            $attributes[$field] = $dateFormat;
        }

        return $attributes;
    }
protected function _formatDate($field, &$attributes)
    {
        if ($this->timestamps && $field) {

            switch ($this->dateFormat) {
                case 'datetime':
                    $dateFormat = date("Y-m-d H:i:s");
                    break;
                
                case 'unixtime':
                default:
                    $dateFormat = time();
                    break;
            }
            
            $attributes[$field] = $dateFormat;
        }

        return $attributes;
    }
protected function _formatDate ( $ field , & $ attributes ) { if ( $ this -> timestamps && $ field ) { switch ( $ this -> dateFormat ) { case 'datetime' : $ dateFormat = date ( "Y-m-d H:i:s" ) ; break ; case 'unixtime' : default : $ dateFormat = time ( ) ; break ; } $ attributes [ $ field ] = $ dateFormat ; } return $ attributes ; }
Format a date for timestamps

@param string Field name
@param array Attributes
@return array Addon $attributes of pointer
Format a date for timestamps