Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:5679Abū Sahl Muḥammad b. Naṣrawayh > Abū Bakr Muḥammad b. Aḥmad b. Khanb > Abū Isḥāq Ismāʿīl b. Isḥāq al-Qāḍī > ʿUbayd b. Yaʿīsh > Yūnus b. Bukayr > Khālid b. Dīnār Abū Khaldah > Anas b. Mālik / Jālis Maʿ al-Ḥakam Amīr al-Baṣrah > al-Sarīr

[Machine] I heard Anas ibn Malik while he was sitting with the ruler, the Amir of Basra, on the bed, saying: "The Messenger of Allah, ﷺ , used to pray when it was hot and pray when it was cold."  

البيهقي:٥٦٧٩أَخْبَرَنَا أَبُو سَهْلٍ مُحَمَّدُ بْنُ نَصْرَوَيْهِ ثنا أَبُو بَكْرٍ مُحَمَّدُ بْنُ أَحْمَدَ بْنِ خَنْبٍ ثنا أَبُو إِسْحَاقَ إِسْمَاعِيلُ بْنُ إِسْحَاقَ الْقَاضِي ثنا عُبَيْدُ بْنُ يَعِيشَ ثنا يُونُسُ بْنُ بُكَيْرٍ أنبأ خَالِدُ بْنُ دِينَارٍ أَبُو خَلْدَةَ قَالَ

سَمِعْتُ أَنَسَ بْنَ مَالِكٍ وَهُوَ جَالِسٌ مَعَ الْحَكَمِ أَمِيرِ الْبَصْرَةِ عَلَى السَّرِيرِ يَقُولُ كَانَ رَسُولُ اللهِ ﷺ إِذَا كَانَ الْحَرُّ أَبْرَدَ بِالصَّلَاةِ وَإِذَا كَانَ الْبَرْدُ بَكَّرَ بِالصَّلَاةِ