Sahih Muslim Book 6, Hadith Number 2455.

Chapter : There is no harm in observing fast if one is Junbi even after dawn.

‘Aisha reported that a person came to the Apostle of Allah (may peace be upon him) asking for a fatwa (religious verdict). She (‘Aisha) had been overhearing it from behind the curtain. ‘Aisha added that he (the person) had said: Messenger of Allah, (the time) of prayer overtakes me as I am in a state of junub; should I observe fast (in this state)? Upon this the Messenger of Allah (may peace be upon him) said: (At times the time) of prayer overtakes me while I am in a state of junub, and I observe fast (in that very state), whereupon he said: Messenger of Allah, you are not like us Allah has pardoned all your sins, the previous ones and the later ones. Upon this he (the Holy Prophet) said: By Allah, I hope I am the most God-fearing of you, and possess the best knowledge among you of those (things) against which I should guard.