ومن صلى لغير القبلة في يوم غيم ثم علم، فإن كان في وقت فليعد، وإن كان قد مضى الوقت فلا إعادة عليه وحسبه اجتهاده.
Additionally, it is mentioned that if someone prays facing the wrong direction (not toward the Qibla) on a cloudy day and later realizes their mistake: if they prayed within the correct prayer time, they should repeat the prayer. However, if the time has passed, they are not obligated to repeat it, as their effort was based on due diligence.