Yahya related to me from Malik from Zayd ibn Aslam from Ata ibn Yasar and from Busr ibn Said and from al-Araj-all of whom related it from Abu Hurayra - that the Messenger of Allah ﷺ said, "Whoever manages to do a raka of subh before the sun has risen has done subh in time, and whoever manages to do a raka of asr before the sun has set has done asr in time."
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ مَنْ أَدْرَكَ رَكْعَةً مِنَ الصُّبْحِ قَبْلَ أَنْ تَطْلُعَ الشَّمْسُ فَقَدْ أَدْرَكَ الصُّبْحَ وَمَنْ أَدْرَكَ رَكْعَةً مِنَ الْعَصْرِ قَبْلَ أَنْ تَغْرُبَ الشَّمْسُ فَقَدْ أَدْرَكَ الْعَصْرَ