In Peskin/Schroeder there is an explicit calculation showing that the retarded Green's function of the real Klein-Gordon field
$$D_R(x-y) ~\equiv~ \theta(x^0 - y^0) \langle 0 | [\phi(x), \phi(y)] |0\rangle\tag{2.55} $$
fulfills the equation
$$(\partial^2 + m^2) D_R(x-y) = -i\delta^4(x-y).\tag{2.56}$$
I can't follow one specific step in the derivation: It seems like they are doing the substitution
$$(\partial_{x^0}\delta(x^0-y^0))\langle 0 | [\phi(x), \phi(y)] |0\rangle = -\delta(x^0-y^0)\partial_{x^0}\langle 0 | [\phi(x), \phi(y)] |0\rangle. \tag{A} $$
But I don't see how this is justified: If we interpret $(\partial_t \delta(t)) f(t)$ as a distribution and act with it on a test function $g(t)$, we get $$\int (\partial_t \delta(t)) f(t)g(t)dt = - \int \delta(t) \partial_t(f(t)g(t))dt = - \partial_t(f(t)g(t))|_{t=0}.\tag{B} $$
If we act instead with $-\delta(t) \partial_t f(t)$ on $g(t)$ we get $$-(g(t)\partial_t f(t))|_{t=0}.\tag{C} $$
Does somebody have an explanation?