Sahih Bukhari Volume 002, Book 018, Hadith Number 154.
Narated By 'AishaÂ : In the life-time of Allah's Apostle (p.b.u.h) the sun eclipsed, so he led the people in prayer, and stood up and performed a long Qiyam, then bowed for a long while. He stood up again and performed a long Qiyam but this time the period of standing was shorter than the first. He bowed again for a long time but shorter than the first one, then he prostrated and prolonged the prostration. He did the same in the second Raka as he did in the first and then finished the prayer; by then the sun (eclipse) had cleared. He delivered the Khutba (sermon) and after praising and glorifying Allah he said, "The sun and the moon are two signs against the signs of Allah; they do not eclipse on the death or life of anyone. So when you see the eclipse, remember Allah and say Takbir, pray and give Sadaqa." The Prophet then said, "O followers of Muhammad! By Allah! There is none who has more ghaira (self-respect) than Allah as He has forbidden that His slaves, male or female commit adultery (illegal sexual intercourse). O followers of Muhammad! By Allah! If you knew that which I know you would laugh little and weep much.