We are given
$$\tag1 \forall x\;\exists \epsilon>0\;\forall y<\epsilon\;f(x+y)=f(x).$$
Specialize to $x=1$:
$$ \exists \epsilon>0\;\forall y<\epsilon\;f(1+y)=f(1).$$
So for suitable positive $\epsilon$,
$$ \forall y<\epsilon\;f(1+y)=f(1).$$
Specialize to $y=-1$ (which certainly is $<\epsilon$):
$$ f(0)=f(1).$$
After an edit of the question:
We are given
$$\tag2 \forall x\;\exists \epsilon>0\;\forall 0<y<\epsilon\;f(x+y)=f(x).$$
Then we have a counterexample, given by $$f(x)=\lfloor x\rfloor+1.$$
Then $(2)$ holds as we can pick $\epsilon=1>0$ when $x\in \Bbb Z$, and $\epsilon=\lceil x\rceil -x>0$ otherwise. However, $f(1)=2\ne f(0)$.
So let's assume additionally that $f$ is continuous on $[0,1]$.
If $f$ is constant on $[0,1]$ we are done. So assume it is not and let $S=\{\,x\in[0,1]\mid f(x)\ne f(0)\,\}\ne\emptyset$ and $a=\inf S$. By continuity, $f(a)=f(0)$ and hence $f(x)=f(0)$ for $x\in[0,a]$. So if $a=1$ we are done. But if $a<1$, there exists $\epsilon>0$ with $f(x)=f(a)$ for $a<x<a+\epsilon$. It follows that $[0,a+\epsilon)\cap S=\emptyset$ and hence $a\ge a+\epsilon$, contradiction.