Disliked prayer times
What are the times when it is disliked to pray?
Scholars call these times 'awqat al-karahiyyah' i.e. disliked prayer times. Hanafi, Shafi'i and Hanbali scholars have maintained that they are three: from sunrise until the sun is one or two spear lengths above the horizon; from the time the sun is at its zenith until it moves on; when the sun yellows and the eyes are not hurt by looking at it until sunset.
Maliki scholars have maintained that awqat al-karahiyyah are two: when the sun rises and when it yellows. According to them, it is not disliked to pray when the sun is at its zenith.
Scholars have agreed that it is categorically disliked to offer voluntary prayers at these times while the Shafi'is maintained that prayers performed at these times are not effected. However, they made exceptions of prayers that are performed for a concomitant cause such as salat al-kusuf wal khusuf (the eclipse prayer), and prayers whose reason of observance occurs before their performance such as the two rak'as (units of prayer) that are offered as a sunnah after ablution and tahiyyat al-masjid (for greeting the mosque). They maintained that it is permissible to offer these prayers at awaqat al-karahiyyah unlike the prayers whose reason of observance occurs after their performance such as the istikhara prayer (prayer for seeking a choice).
Allah the Almighty knows best.