The Prophet ﷺ said, "Whoever catches one prostration before sunrise has caught the prayer, and whoever catches one prostration before sunset has caught the prayer."
حدثنا معاوية قال حدثنا زائدة قال حدثنا عبد الله بن ذكوان أبو الزناد عن عبد الرحمن
عن النبي ﷺ قال من أدرك قبل طلوع الشمس سجدة فقد أدرك الصلاة ومن أدرك قبل غروب الشمس سجدة فقد أدرك الصلاة
Its chain of transmission is sahih. Bukhari related something similar to it, 1/151, in "the times of prayer, whoever catches a rakat of the prayer," and Muslim, 1/424, no. 608, in "the mosques," with similar wording, and Tirmidhi, 1/353, no. 186, and Abu Dawud, 1/112, no. 412.