قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " لا تَقُومُ السَّاعَةُ حَتَّى تَطْلُعَ الشَّمْسُ مِنْ مَغْرِبِهَا، فَإِذَا طَلَعَتْ وَرَآهَا النَّاسُ آمَنُوا أَجْمَعُونَ، وَذَلِكَ حِينَ لا يَنْفَعُ نَفْسًا إِيمَانُهَا لَمْ تَكُنْ آمَنَتْ مِنْ قَبْلُ، أَوْ كَسَبَتْ فِي إِيمَانِهَا خَيْرًا "
And the Messenger of Allah, peace and blessings be upon him, said: "The Hour will not be established until the sun rises from the west. (Then after that) when it rises, the people will all believe upon seeing it, but this will be a stage when the faith of any soul will not benefit it. Because before this, neither had it accepted faith nor had it attained any good through its faith."
Related hadith on this topic