That discussion is about a spherical shell and does not apply to the Earth nor to the sun. In the latter situations assuming uniform mass distribution we know that time is dilated by $t(\infty)/t(r)=\sqrt{g_{00}}=\sqrt{1 - \frac{2GM}{rc^2}}$, where $r$ is the distance from the center.
For a spherical SHELL however we have to go back and forth between the GR and its Newtonian limit. Since the Earth's and Sun's gravity is weak we can approximate $\sqrt{g_{00}} = \sqrt{1 - 2\Phi(r)}$, now the potential $\Phi(r)$ outside the shell is the same as before $\Phi_{\text{out}}(r)=GM/rc^2$, however inside the shell it is $\Phi_{\text{in}}(r) = GM/Rc^2 = $const.
There fore the different in passage of time between a position $r$ from the center and infinitely far away is
$$
t(\infty)/t(r) = \sqrt{1 - 2\Phi(r)}=\left\{\begin{array}{cc} \sqrt{1 - \frac{2GM}{Rc^2}} =\text{const}\qquad & \forall r\leq R \\
\sqrt{1 - \frac{2GM}{rc^2}} \qquad & \forall r\geq R
\end{array}\right.
$$