private function _check_time_column($column)
    {
        if (!static::table()->columnExists($column))
            return false;
        
        $type = static::table()->columnType($column);
        
        if ($type == 'datetime' || $type == 'timestamp')
            $time = date('Y-m-d H:i:s');
        elseif ($type == 'year')
            $time = date('Y');
        elseif ($type == 'date')
            $time = date('Y-m-d');
        elseif ($type == 'time')
            $time = date('H:i:s');
        else
            return false;
        
        $this->attributes[$column] = $time;
        
        return true;
    }
private function _check_time_column($column)
    {
        if (!static::table()->columnExists($column))
            return false;
        
        $type = static::table()->columnType($column);
        
        if ($type == 'datetime' || $type == 'timestamp')
            $time = date('Y-m-d H:i:s');
        elseif ($type == 'year')
            $time = date('Y');
        elseif ($type == 'date')
            $time = date('Y-m-d');
        elseif ($type == 'time')
            $time = date('H:i:s');
        else
            return false;
        
        $this->attributes[$column] = $time;
        
        return true;
    }
private function _check_time_column ( $ column ) { if ( ! static :: table ( ) -> columnExists ( $ column ) ) return false ; $ type = static :: table ( ) -> columnType ( $ column ) ; if ( $ type == 'datetime' || $ type == 'timestamp' ) $ time = date ( 'Y-m-d H:i:s' ) ; elseif ( $ type == 'year' ) $ time = date ( 'Y' ) ; elseif ( $ type == 'date' ) $ time = date ( 'Y-m-d' ) ; elseif ( $ type == 'time' ) $ time = date ( 'H:i:s' ) ; else return false ; $ this -> attributes [ $ column ] = $ time ; return true ; }
Check time column

Called by save() and create(), checks if $column
exists and automatically sets a value to it.
Check time column