  Cosmological time dilation is a fundamental phenomenon in an expanding
universe, which stresses that both the duration and wavelength of the emitted
light from a distant object at the redshift $z$ will be dilated by a factor of
$1+z$ at the observer. By using a sample of 139 \emph{Swift} long GRBs with
known redshift ($z\leq8.2$), we measure the observed duration ($T_{90}$) in the
observed energy range between $140/(1+z)$ keV and $350/(1+z)$ keV,
corresponding to a fixed energy range of 140-350 keV in the rest frame. We
obtain a significant correlation between the duration and the factor $1+z$,
i.e., $T_{\rm{90}}=10.5(1+z)^{0.94\pm0.26}$, which is well consistent with that
expected from cosmological time dilation effect.
