Umar bin Khattab came to the Prophet ﷺ on the day of the Battle of the Trench and said, "Messenger of Allah, by Allah, I could hardly pray the afternoon prayer until the sun was about to set," and that was after the time when a fasting person breaks his fast.The Prophet ﷺ replied, "By Allah, I have not prayed it either."So the Prophet ﷺ went down to Bathan, and I went with him. He performed the ablution and then prayed the afternoon prayer after the sun had set, and after that he prayed the sunset prayer.
حدثنا أبو نعيم قال حدثنا شيبان عن يحيى قال سمعت أبا سلمة يقول أخبرنا
أن النبي ﷺ جاءه عمر بن الخطاب يوم الخندق فقال يا رسول الله والله ما كدت أن أصلي حتى كادت الشمس تغرب وذلك بعد ما أفطر الصائم فقال النبي ﷺ والله ما صليتها فنزل النبي ﷺ إلى بطحان وأنا معه فتوضأ ثم صلى يعني العصر بعد ما غربت الشمس ثم صلى بعدها المغرب