The Prophet ﷺ said, "The Hour will not come until the sun rises from its place of setting. When it rises, all people will believe at that moment. But on that day, 'no soul will benefit from its faith if it had not believed before or earned good through its faith'" [Anam 6:158].
حدثنا سليمان أنبأنا إسماعيل أخبرني العلاء عن أبيه
أن النبي ﷺ قال لا تقوم الساعة حتى تطلع الشمس من مغربها فإذا طلعت آمن الناس حينئذ أجمعون ويومئذ {لا ينفع نفسا إيمانها لم تكن آمنت من قبل أو كسبت في إيمانها خيرا}
Its isnad is sahih. Bukhari related something similar, 8/297, no. 4636, in Fath al-Bari, in the tafsir section, as did Muslim, 1/137, no. 157, in the book of faith, chapter on whose faith is not accepted, and Abu Dawud, 4/115, no. 4312. It has already been mentioned under no. 8583.