Taken from: Fatawa Arkan-e-Islam
① After Fajr until sunrise:
② Around midday before Dhuhr (time of zawal):
③ After ‘Asr until sunset:
Examples:
At any time of day or night, whenever you enter a mosque, you should perform two rak‘ahs of Tahiyyat al-Masjid before sitting, even if it falls within a normally prohibited prayer time.
والله أعلم بالصواب
⮚ Prohibited Times for Voluntary (Nafl) Prayer
① After Fajr until sunrise:
- From the completion of Fajr prayer until the sun rises to the height of a spear (approximately 15–20 minutes after sunrise), offering nafl prayers is prohibited.
② Around midday before Dhuhr (time of zawal):
- Roughly 10 minutes before Dhuhr begins, when the sun is at its zenith, it is prohibited to pray.
③ After ‘Asr until sunset:
- From the completion of ‘Asr prayer until the sun fully sets, nafl prayers are not allowed.
⮚ Ruling on Tahiyyat al-Masjid
- Tahiyyat al-Masjid (two rak‘ahs offered upon entering the mosque) can be performed at any time.
- Whenever you enter the mosque, do not sit without performing two rak‘ahs, even if it is during one of the prohibited times.
- The stronger scholarly view is:
- Any nafl prayer with a specific reason (nawafil dhawat al-asbab) is permissible even during the prohibited times.
Examples:
- If you enter the mosque after Fajr, you may still perform Tahiyyat al-Masjid.
- If you enter after ‘Asr, it is still allowed.
- Before zawal, the same applies.
⮚ Summary
At any time of day or night, whenever you enter a mosque, you should perform two rak‘ahs of Tahiyyat al-Masjid before sitting, even if it falls within a normally prohibited prayer time.
والله أعلم بالصواب