Let $\pi:X\to S$ be a morphism of relative dimension one, where $X$ is a regular surface over a regular scheme $S$ of dimension one (everything over $\mathbb C$). We denote by $\omega_\pi$ the relative dualizing sheaf $\omega_X-\pi^\ast \omega_S$. Let $D$ be any divisor in $X$ and $C\subset X$ a nonsingular curve (Edit:) contained in a fiber. I am interested in understanding why $$\omega_\pi(D)|_C\cong \omega_C(D.C).\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,(1)$$ I know that adjunction formula, in this situation, says $\omega_C=\omega_\pi(C)|_C$.
I would start by saying: $$\omega_\pi(D)|_C\cong \omega_\pi|_C(D.C),$$ but I cannot conclude because I do not know whether the latter is isomorphic to $$\omega_\pi(C)|_C(D.C).$$ If this were true, adjunction formula would give the result $(1)$.
Could you please help me to understand why $\omega_\pi|_C(D.C)\cong\omega_\pi(C)|_C(D.C)$?