The Messenger of Allah ﷺ said, "Whoever repents before the sun rises from the west, Allah will accept his repentance."
قال رسول الله ﷺ: من تاب قبل أن تطلع الشمس من مغربها تاب الله عليه.
Muslim narrated it in "Remembrance and Supplication" (2703) through several routes from Hisham bin Hassan, from Muhammad bin Sirin, from Abu Hurairah, who related it.