It is narrated from Sayyiduna Khabbab bin al-Aratt (may Allah be pleased with him) that he said: We made a request to the Messenger of Allah (peace and blessings be upon him) about the intensity of the heat, but he (peace and blessings be upon him) did not accept our complaint and said: "When the sun has declined, then pray."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2066