have tried to prove that if the function is convex, then all locals are also global, but I don't know where I used the fact that the function is convex and not strictly convex.
Suppose $f: X \subset \mathbb{R}^n \to \mathbb{R} \ $ convex function,that is
$f(\alpha x+ (1-\alpha) y) \leq \alpha f(x)+(1- \alpha )f(y) $
And consider $x_1$ a local minimum of $Y\subset X$ and $x_2$ a global minimum of $f$,that is
$\exists \ \epsilon>0 $ such that $\forall x \in Y \cap B_{\epsilon}(x_1) , f(x_1)\leq f(x)$
$\forall x\in X$ , $f(x_2)\leq f(x)$
It is always true that
$f(x_2)\leq f(x_1)$
Let's consider the case where $f(x_2)<f(x_1)$, then
$hf(x_2)<hf(x_1)$ $\Rightarrow$ $hf(x_2)+(1-h)f(x_1) < hf(x_1)+(1-h)f(x_1) \ \forall h\in (0,1)$
$f(hx_2 +(1-h)x_1) \leq hf(x_2)+(1-h)f(x_1) <f(x_1)$ ,then
$$ f(hx_2 +(1-h)x_1) <f(x_1) $$
This implies that $ x_1 $ is not a local minimum, as $hx_2 + (1-h) x_1$ is as close to $x_1$ as we want
I don't know where it was used that the function is convex and not strictly convex, it seems to work for strictly convex functions too.