It is narrated from Hazrat Abu Dharr (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: O Abu Dharr! Perform the prayer at its appointed time. If you come at a time when the people have already performed the prayer, then you have preserved your prayer. And if they have not yet performed the prayer, then join them, and this prayer will be counted as a voluntary (nafl) prayer for you.