He began cursing the disbelievers of Quraysh on the day of the Battle of the Trench and said, "Messenger of Allah, by Allah, I could hardly pray Asr until the sun was about to set."The Messenger of Allah ﷺ replied, "By Allah, I have not prayed it either."So we went down to Buthan, and the Messenger of Allah ﷺ performed ablution and we performed ablution. Then the Messenger of Allah ﷺ prayed Asr after the sun had set, and after it he prayed Maghrib.
انه جعل يسب كفار قريش يوم كادت الخندق وقال: يا رسول الله، والله ما كدت أن أصلي العصر حتى كدت أن تغرب الشمس. فقال رسول الله ﷺ: فوالله إن صليتها فنزلنا إلى بطحان فتوضأ رسول الله ﷺ وتوضأنا فصلى رسول الله ﷺ العصر بعد ما غربت الشمس، ثم صلى بعدها المغرب.
Bukhari narrated it in the Book of Prayer Times (596) and in other places, and Muslim narrated it in the Book of Mosques (631), both of them from Hisham (Dastawai), from Yahya bin Abu Kathir, from Abu Salama bin Abdul-Rahman, from Jabir bin Abdullah, from Umar bin Khattab, who mentioned the same thing. The wording given is that of Muslim.His statement, "By Allah, I have prayed it," means "I have not prayed it." The Prophet ﷺ swore only to comfort Umar's heart, for it had troubled him greatly that Asr had been delayed until Maghrib, so the Prophet told him that he himself had not prayed it either. This is made explicit in the version found in Bukhari, where he said, "By Allah, I have not prayed it."