The Messenger of Allah ﷺ said, "Whoever repents before the sun rises from the west, Allah will accept his repentance."
حدثنا أبو معاوية عن هشام بن حسان عن ابن سيرين
قال رسول الله ﷺ من تاب قبل طلوع الشمس من مغربها تاب الله عليه
No references are available.
Its isnad is sahih. Muslim narrated it in the Book of Remembrance, Repentance, 4/2076, no. 2703.