Let $f \in L^2(0,T)$ be such that $f(t)$ is well-defined for every $t$ (not just a.e. $t$). But I have no continuity of $f$.
We have by Lebesgue's differentiation theorem that $$\lim_{a \to 0}\frac{1}{a}\int_{t-a}^t f(s) = f(t)$$ for almost all $t \in [0,T]$. Could it be the case that for my particular $f$ that this statement can be strengthened to for all $t \in [0,T]$?
You will have problems with points of discontinuity. For instance, if $f(x) = \chi_{[T/2,T]}(x)$ then $$\int_{T/2-a}^{T/2} f(s) \, ds = 0$$ for all $0 < a < T/2$, but $f(T/2) = 1$.