Abdullah bin Umar reported,

He used to say, "I only do as I saw my companions doing. I do not forbid anyone from praying at whatever hour he wishes, whether by night or by day, except that you should not deliberately time it with the rising of the sun or its setting."

Bukhari 1192

Sahih

قال وكان يقول إنما أصنع كما رأيت أصحابي يصنعون ولا أمنع أحدا أن يصلي في أي ساعة شاء من ليل أو نهار غير أن لا تتحروا طلوع الشمس ولا غروبها

البخاري 1192صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Virtue of prayer in the masjid of Makkah and Madinah
Chapter
Masjid of Quba
Numbering
Darussalam 1192
Bukhari 1192