Narrated Abu Musa:
The sun eclipsed and the Prophet got up, being afraid that it might be the Hour (i.e. Day of Judgment). He went to the Mosque and offered the prayer with the longest Qiyam, bowing and prostration that I had ever seen him doing. Then he said, “These signs which Allah sends do not occur because of the life or death of somebody, but Allah makes His worshipers afraid by them. So when you
see anything thereof, proceed to remember Allah, invoke Him and ask for His forgiveness.”
Sahih Bukhari, Volume 2, Book18, Number 167