A person cannot locate where the qibla is; thus, he makes taharri. After he completes his prayer, he comes to know of the qibla. Also, the time for prayer has not yet expired. Would it be necessary for him to repeat the prayer?
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيْم
In the name of Allah, the Most Gracious, the Most Merciful
It would not be necessary for him to repeat his prayer after completing it then realizing his mistake regardless of whether the time expired or not.
Raddul Muhtar: v. 2, p. 116 (Maktaba Imdadia)
Only Allah knows best
Written by Maulana Mohammad Ahsan Osmani
Checked and approved by Mufti Mohammed Tosir Miah
Darul Ifta Birmingham