  We attempt to calculate the gravitational time delay in a time-dependent
gravitational field, especially in McVittie spacetime, which can be considered
as the spacetime around a gravitating body such as the Sun, embedded in the
FLRW (Friedmann-Lema\^itre-Robertson-Walker) cosmological background metric. To
this end, we adopt the time transfer function method proposed by Le
Poncin-Lafitte {\it et al.} (Class. Quant. Grav. 21:4463, 2004) and Teyssandier
and Le Poncin-Lafitte (Class. Quant. Grav. 25:145020, 2008), which is
originally related to Synge's world function $\Omega(x_A, x_B)$ and enables to
circumvent the integration of the null geodesic equation. We re-examine the
global cosmological effect on light propagation in the solar system. The
round-trip time of a light ray/signal is given by the functions of not only the
spacial coordinates but also the emission time or reception time of light
ray/signal, which characterize the time-dependency of solutions. We also apply
the obtained results to the secular increase in the astronomical unit, reported
by Krasinsky and Brumberg (Celest. Mech. Dyn. Astron. 90:267, 2004), and we
show that the leading order terms of the time-dependent component due to
cosmological expansion is 9 orders of magnitude smaller than the observed value
of $d{\rm AU}/dt$, i.e., $15 \pm 4$ ~[m/century]. Therefore, it is not possible
to explain the secular increase in the astronomical unit in terms of
cosmological expansion.
