I asked, "Messenger of Allah, is one hour closer to Allah than another, or is there an hour worth seeking out for remembrance?"He replied, "Yes. The closest the Lord is to His servant is in the depths of the latter part of the night. So if you can be among those who remember Allah
in that hour, then do so, for prayer is attended and witnessed until the rising of the sun. It rises between the two horns of Satan, and that is the hour of the prayer of the disbelievers, so leave off prayer until the sun has risen the length of a spear and its rays have dispersed. Then prayer is attended and witnessed until the sun stands straight up like a spear at midday. That is an hour in which the gates of Hell are opened and stoked, so leave off prayer until the shadow returns. Then prayer is attended and witnessed until the sun sets, for it sets between the two horns of Satan, and that is the prayer of the disbelievers."
أخبرنا عمرو بن منصور قال أنبأنا آدم بن أبي إياس قال حدثنا الليث بن سعد قال حدثنا معاوية بن صالح قال أخبرني أبو يحيى سليم بن عامر وضمرة بن حبيب وأبو طلحة نعيم بن زياد قالوا سمعنا أبا أمامة الباهلي يقول سمعت
قلت يا رسول الله هل من ساعة أقرب من الأخرى أو هل من ساعة يبتغى ذكرها قال نعم إن أقرب ما يكون الرب عز وجل من العبد جوف الليل الآخر فإن استطعت أن تكون ممن يذكر الله عز وجل في تلك الساعة فكن فإن الصلاة محضورة مشهودة إلى طلوع الشمس فإنها تطلع بين قرني الشيطان وهي ساعة صلاة الكفار فدع الصلاة حتى ترتفع قيد رمح ويذهب شعاعها ثم الصلاة محضورة مشهودة حتى تعتدل الشمس اعتدال الرمح بنصف النهار فإنها ساعة تفتح فيها أبواب جهنم وتسجر فدع الصلاة حتى يفيء الفيء ثم الصلاة محضورة مشهودة حتى تغيب الشمس فإنها تغيب بين قرني شيطان وهي صلاة الكفار
[Its chain of transmission is sahih] Previously mentioned, no. 147, and it is in Kubra, no. 1544. Ibn Khuzayma also narrated it, 2/182, no. 1147, from the hadith of Muawiya bin Salih through the same route, in an abridged form.