I think you're mixing up two somewhat-related but distinct theorems:
If $f$ is a convex function, every local minimum of $f$ is also a global minimum.
If $f$ is $C^2$ and $f'(x)=0; f''(x)>0$ then $f$ has a local minimum at $x$.
This second fact is a sufficient condition on the existence of a local minimum, but not a necessary condition. (This sufficient condition generalizes to higher dimension, where the condition instead is that $\nabla f(x) =0 $ and $Hf(x)$ is positive-definite. It is an immediate consequence of Taylor's theorem.)
Even for smooth functions, sometimes a local minimum does not have positive second derivative. Consider for instance $f(x) = x^4$, which clearly has a minimum at $x=0$ but $f''(0)=0$.
The function $f(x) = |x|$ is not a contradiction to the above: it is convex so fact (1) applies. It is not in $C^2$, but even if it were, it would not be a contradiction to fact (2) since the latter is a sufficient condition, not an "if-and-only-if" condition.