A local minimizer is a point $\hat{x}$ for which there exists some neighbourhood $U$ of $\hat{x}$ in which $f(x) \ge f(\hat{x})$ for all $x \in U$. Similarly for a local maximizer. This characterization holds regardless of how smooth $f$ is.
It would help to visualize the function:

We have $f(0) = 0$, $0 \le f(x) \le x$ for all $x >0$ and $x \le f(x) \le 0$ for all $x <0$. In addition, in any neighbourhood, $f$ attains these values.
From the picture, we see that $x=0$ is neither a local minimizer or maximizer, and for $x>0$, $f$ has no local maximizers and for $x<0$, $f$ has no local minimizers. However, for $x>0$, any irrational $x$ is a local minimizer and similarly, for $x<0$, any irrational $x$ is a local maximizer.
To prove this, we note that $f(\pm \frac{1}{n}) = \pm \frac{1}{n}$, and $f(0) = 0$, which shows that $x=0$ is neither a local minimizer or maximizer.
For $x>0$, we have $f(x) \ge 0$. If $x$ is irrational, then $f(x) = 0$, and hence $x$ is a local minimizer. Since any rational $y$ in the neighbourhood of $x$ has $f(y) >0$, we see that $x$ is not a local maximizer. If $x$ is rational, then $f(x) = x$, and since $f(x+\frac{1}{2}) = x+\frac{1}{2} > f(x)$, we see that $x$ is not a local maximizer. Similarly, at any irrational $y$ in a neighbourhood of $x$, we have $f(y)= 0 < f(x)$, we see that $x$ is not a local minimizer.
Since $f(-x) = -f(x)$, the same reasoning above applies, mutatis mutandis.