Until the sun rises from the west
Abu Musa Al-Ash’ari (radi Allahu anhu) reported that the Messenger of Allah (sal Allahu alaihi wa sallam) said: “Allah, the Exalted, will continue to stretch out His Hand in the night so that the sinners of the day may repent, and continue to stretch His Hand in the daytime so that the sinners of the night may repent, until the sun rises from the west”
This Hadith confirms an essential Attribute of Allah, i.e., the Hand which He stretches out anytime He wishes without drawing similarity to it, nor interpretation. Such was the attitude of the pious predecessors with regards to all of the essential Attributes of Allah. It is deduced from this Hadith that if one commits a sin during any hour of day or night, he should immediately seek the forgiveness of Allah as a result.
And Allah Knows Best!