who delay the prayer beyond its appointed time, or neglect it until its time has passed?”
Abū Dharr said: “I asked, ‘What, then, do you command me to do?’ He replied, ‘Offer the prayer at its appointed time. Then, if you find them praying it, pray with them, for it will count as a voluntary prayer for you.’”
In another version narrated by Muslim:
“The Messenger of Allah, peace and blessings be upon him, struck my thigh and said, ‘How will you fare if you live among people who delay the prayer beyond its appointed time?’ I asked, ‘What, then, do you command me to do?’ He replied, ‘Offer the prayer at its appointed time, then go about your business. If the congregation begins the prayer while you are in the mosque, pray with them.’”
In yet another version narrated by Muslim:
“Offer the prayer at its appointed time. Then, if you find the prayer being offered, pray, and do not say, ‘I have already prayed, so I will not pray.’”
These texts unquestionably include the Zuhr and Asr prayers, since these were the two prayers that the rulers used to delay. This was unlike Fajr, which they did not offer after sunrise. Likewise, they did not delay Maghrib, but they would sometimes delay Asr until the sun began to set.
Thus, he commanded him to offer the prayer at its appointed time and then, despite having already offered it, to pray it again with them as a voluntary prayer. This would be during a time when prayer is prohibited, since he had already prayed Asr, and because they might delay Asr until the sun turned yellow. This explicitly establishes repeating the prayer during a prohibited time.