It was reported on the authority of A’isha (may Allah be pleased with her) who said: “An eclipse of the sun occurred during the time of the Messenger of Allah ﷺ, so the Messenger of Allah ﷺ led people in Salat. He stood and remained standing for a long time, he then bowed for a long time, he then rose and stood for another long time, but not as long as the first standing. He bowed again for a long time, but it was also shorter than the first one, and then he prostrated and prolonged the prostration. He did in the second Rak’ah as he had done in the first. Thereafter he completed the Salat. By then, the sun (eclipse) had cleared. Following that, he delivered a khutbah (a sermon). He praised Allah and glorified him and then he said, “The sun and the moon are two signs among the numerous signs of Allah; they are not made to eclipse due to the death or life of anyone. Thus when you see the eclipses, supplicate unto Allah and say takbeer, offer Salat and give sadaqah.” [ Source: Al-Bukhari.]
On this note, when an eclipse of the sun or the moon occurs: People are called to Salat by saying: “As-Salatu Jami’ah”. Meaning: “Come unto a congregational Salat”.
When people are gathered, the imam leads them in a long two-raka’at prayer, reading aloud in both. He recites al-Fatiha and a long chapter in the first rak’ah, he then bows and prolongs the bowing.
He rises saying “Sami‘al-lahu liman hamidah. Rabbana walakal hamd.” He then recites al-Fatiha and a long chapter, but not as long as in the first standing. He bows and prolongs the bowing, but not as long as the first. He then rises saying: “Sami‘al-lahu liman hamidah., Rabbana walakal hamdu”... continuing with the pray. He then prostrates two long prostrations sitting in between both, without prolonging this sitting; he then rises from the second prostration saying the takbeer. He observes the second rak’ah like the first one, in standing, bowing and prostration, but not equal in length. He then sits to recite at-Tashahud and says at-Tasleem thereafter.