Section II: The Ruling of Praying During These Times

Firstly: Ruling of making up missed wajib Prayers during these times
Missed wajib prayers are offered during all times when prayer is prohibited. This is the position of the majority: the Malikis, Shafi`is, Hanbalis, and some of the Salaf. This is the position of choice according to Ibn al-Mundhir, Ishaq, and Abu Thawr.

Secondly: Ruling of offering prayers that have a legal reason during these times
Scholars are of two positions with respect to offering prayers that have a legal reason [464] Al-Nawawi says: “The meaning of ‘prayers with a legal reason’ are those that have a reason that precedes the prayer. Examples include: missed prayers…the funeral prayer, prostrating due to Qur’anic recitation or gratitude, the eclipse prayer, and the prayer that follows circumambulation of the Ka`bah.” (Al-Majmu`, 4/170) during times when prayer is prohibited:
The first position: It is permissible to offer prayers that have a legal reason during times when prayer is prohibited. This is the position of the Shafi`i school, one narration from Ahmad, and the position of some of the Salaf. It is the position of choice according to Ibn Taymiyyah, Ibn al-Qayyim, Ibn Baz, and Ibn `Uthaymin.
The second position: It is not permissible to offer prayers that have a legal reason during times when prayer is prohibited. This is the position of the majority: the Hanafis, Malikis, and Hanbalis.

Thirdly: Ruling of offering non-specific optional prayers during these times
It is not permissible to offer optional prayers that have no specific reason during times when prayer is prohibited, especially during sunrise and sunset. Consensus that it is haram to offer optional prayers that don’t have a specific reason during times when prayer is prohibited has been related by Ibn `Abd al-Barr, al-Nawawi, and al-`Iraqi.