The Prophet ﷺ said, "Whoever repents before the sun rises from the west, Allah will accept his repentance."
حدثنا هوذة حدثنا عوف عن محمد
عن النبي ﷺ قال من تاب قبل أن تطلع الشمس من مغربها تاب الله عليه
Its isnad is sahih. Muslim also narrated it in 4/2076, no. 2703, in the chapter on remembrance, on the recommendation of seeking forgiveness.