Time for Maghrib and Isha prayers
743. The obligatory precaution is that as long as the redness in the eastern sky appearing after sunset has not passed overhead, Maghrib Namaz should not be performed.
744. In normal circumstances, the prescribed time for Maghrib and Isha
prayers is till midnight. But if forgetfulness, oversleeping or being in Hayz
and similar unusual situations prevent one from performing the prayers till
midnight, then for them the time will continue till Fajr sets in.
In all the cases, Maghrib must be prayed before Isha, and if one contradicts their sequence purposely or knowingly, the Namaz will be void. However, if the time left over is just enough for Isha prayers to be offered within time, then Isha will precede Maghrib prayers.
745. If a person offers Isha prayers before Maghrib prayers by mistake and takes notice of this after completing the prayers, his prayers will be valid, and then he should offer Maghrib prayers after it.
746. If a person begins Isha prayers by mistake before Maghrib prayers and realises during the prayers that he has made an error, and if he has not yet gone into Ruku of the 4th Rak'at he should turn his Niyyat to Maghrib prayers and complete the prayers. Thereafter he will offer Isha prayers. However, if he has entered Ruku of the 4th Rak'at he can continue to complete the Isha prayers and thereafter pray Maghrib.
747. In normal circumstances, the end of the time for Isha prayers is midnight; and the night will be calculated from dawn (Subh-e-Sadiq).
748. If a person in normal circumstances does not offer Maghrib or Isha prayers till after midnight, he should, as an obligatory precaution, offer the prayers in question before the dawn prayers, without making a Niyyat of Ada (i.e. in time) or Qadha (i.e. after the lapse of time).