The Messenger of Allah ﷺ said, "If any of you catches a single prostration of the afternoon prayer before the sun sets, let him complete his prayer, and if he catches a single prostration of the dawn prayer before the sun rises, let him complete his prayer."
حدثنا أبو نعيم قال حدثنا شيبان عن يحيى بن أبي كثير عن أبي سلمة
قال رسول الله ﷺ إذا أدرك أحدكم سجدة من صلاة العصر قبل أن تغرب الشمس فليتم صلاته وإذا أدرك سجدة من صلاة الصبح قبل أن تطلع الشمس فليتم صلاته