The time delay experienced by a light ray as it passes through a changing gravitational potential by a non-zero mass distribution along the line of sight is usually referred to as Shapiro delay. Shapiro delay has been extensively measured in the Solar system and in binary pulsars, enabling stringent tests of general relativity as well as measurement of neutron star masses . However, Shapiro delay is ubiquitous and experienced by all astrophysical messengers on their way from the source to the Earth. We calculate the one-way static Shapiro delay for the first discovered millisecond pulsar PSR~B1937+21, by including the contributions from both the dark matter and baryonic matter between this pulsar and the Earth. We find a value of approximately 5 days (of which 4.74 days is from the dark matter and 0.22 days from the baryonic matter). We also calculate the modulation of Shapiro delay from the motion of a single dark matter halo, and also evaluate the cumulative effects of the motion of matter distribution on the change in pulsars period and its derivative. The time-dependent effects are too small to be detected with the current timing noise observed for this pulsar. Finally, we would like to emphasize that although the one-way Shapiro delay is mostly of academic interest for electromagnetic astronomy, its ubiquity should not be forgotten in the era of multi-messenger astronomy.