No, I don't want this to turn into a bashing or anything like that.. I seriously want to talk religion.
Here is a good article that explains this process.
This part of Christianity has always frustrated me but the Lord ways are higher than ours. God is filled with grace and is not bounded by time so when a person surrenders his or her life right before physical earth death doesn't mean God sees that time. He sees a heart surrendered to Him.