• We studied the variation over time of the geographic proximity effect on knowledge flows. • Flows are associated to citations exchanged between scientific publications. • We analyze world publications citing 2010–2012 Italian publications in the WoS. • Gravity models are used to control for sizes and relevant cognitive proximity. • The analysis, overall and at discipline level, both includes and excludes self-citations. This work analyzes the variation over time of the effect of geographic distance on knowledge flows. The flows are measured through the citations exchanged between scientific publications, including and excluding self-citations. To calculate geographic distances between citing and cited publication, each publication is associated with a "prevailing" territory, according to the authors' affiliations. We then apply a gravity model to account for the research size of the territories, in terms of cognitive proximity of citing-cited publications. The field of observation is the 2010–2017 world publications citing the 2010–2012 Italian publications, as indexed in the Web of Science. The results show that in domestic knowledge flows, geographic proximity remains an influential factor through time, although with differences among disciplines and trends of attenuating effects. Finally, we replicate the analyses of knowledge flows but with the exclusion of self-citations: in this manner the effect of geographic proximity seems reduced, particularly at the national scale, but the differences (with vs without self-citations) lessen through time. As shown in previous works, the effect of distance on continental flows is modest (imperceptible for intercontinental flows), yet here too time has some influence, including concerning exclusion of self-citations. [ABSTRACT FROM AUTHOR]