We will investigate the influence of the inhomogeneity of the universe, especially that of the Lema{\^i}tre--Tolman--Bondi (LTB) model, on a gravitationally bound local system such as the solar system. We concentrate on the dynamical perturbation to the planetary motion and derive the leading order effect generated from the LTB model. It will be shown that there appear not only a well-known cosmological effect arisen from the homogeneous and isotropic model, such as the Robertson--Walker (RW) model, but also the additional terms due to the radial inhomogeneity of the LTB model. We will also apply the obtained results to the problem of secular increase in the astronomical unit, reported by Krasinsky and Brumberg (2004), and imply that the inhomogeneity of the universe cannot have a significant effect for explaining the observed $d{\rm AU}/dt = 15 \pm 4 ~{\rm [m/century]}$.