Rotations in SO(3)

I've read in a book that every rotation in the $SO(3)$ can be represented by a matrix of the form $\begin{pmatrix} \cos(\theta)&-\sin(\theta)&0 \\ \sin(\theta)&\cos(\theta)&0 \\ 0&0&1 \end{pmatrix}$ for some $\theta$.

Now $\begin{pmatrix} 1&0&0 \\ 0&-1&0 \\ 0&0&-1 \end{pmatrix}$ is still a rotation and not of the given form. What is wrong with the first representation?

$$\begin{bmatrix}0&0&1\\0&1&0\\1&0&0\end{bmatrix}\begin{bmatrix} 1&0&0 \\ 0&-1&0 \\ 0&0&-1 \end{bmatrix}\begin{bmatrix}0&0&1\\0&1&0\\1&0&0\end{bmatrix}=\begin{bmatrix}-1&0&0\\0&-1&0\\0&0&1\end{bmatrix}$$
What's meant most likely is that every element of $\mathsf{SO}(3,\mathbb R)$ is congugate to a matrix of that form.
Now \begin{pmatrix} 1&0&0 \\ 0&-1&0 \\ 0&0&-1 \end{pmatrix} is conjugate to \begin{pmatrix} -1&0&0 \\ 0&-1&0 \\ 0&0&1 \end{pmatrix} via a permutation of the basis, which is of the stated form with $\theta=\pi$.