The scholars differed concerning the ruling on one who eats or drinks thinking that it is still night and that dawn has not yet come, and the one who eats or drinks thinking that the sun has set then he finds out that he was mistaken.
Many of the scholars were of the view that this invalidates his fast, and he must fast another day to make up for it.
Others were of the view that his fast is still valid and that he should complete his fast and does not have to make it up.
This is the view of Mujaahid and al-Hasan among the Taabi'een, it was narrated in one report from Imam Ahmad, and it was the view favoured by al-Muzani among the Shaafa'is, and by Shaykh al-Islam Ibn Taymiyah. It was also the view regarded as correct by Shaykh Muhammad ibn al-Saalih al-Uthaymeen (may Allaah have mercy on them all).
Shaykh al-Islam Ibn Taymiyah said:
Those who say that the fast is not broken if a person makes a mistake or forgets at the beginning or end of the day said: our evidence is stronger, and the evidence of the Qur'aan and Sunnah concerning what we say is clearer. Allaah says (interpretation of the meaning):
Our Lord! Punish us not if we forget or fall into error
Forgetting and falling into error are mentioned together, because the one who does things that are forbidden in Hajj or prayer by mistake is like one who does them out of forgetfulness. It was proven in al-Saheeh that one day at the time of the Prophet (peace and blessings of Allaah be upon him) they broke the fast and then the sun appeared, but it does not say in the hadeeth that they were ordered to make up that fast. But Hishaam ibn Urwah said: It must be made up, but his father was more knowledgeable than him and he said, They do not have to make it up. And it was proven in al-Saheehayn that a group of Sahaabah used to eat until one of them could distinguish the white thread from the black. The Prophet (peace and blessings of Allaah be upon him) said to one of them, Your pillow is wide [if the white thread (of dawn) and the black thread (of the night) are underneath your pillow], rather that is the whiteness of the day and the blackness of the night. But it is not narrated that he told them to make up their fasts; they were ignorant of the ruling so they were making a mistake. And it is proven that Umar ibn al-Khattaab broke his fast then it became clear that it was still day, but he said, We will not make it up because we did not deliberately commit sin. And it was narrated that Umar said: We will make it up, but the isnaad of the first report is stronger. And it was narrated from him that he said, It is not a serious matter. So some of the scholars understood this as meaning that it is not essential to make it up, but the wording does not indicate that.
In conclusion, this view is stronger in terms of reports and reasoning, and is more strongly supported by evidence from the Qur'aan and Sunnah and analogy (qiyaas).
Majmoo' al-Fataawa, 20/572, 573
See also al-Sharh al-Mumti', 6/411.
Hence we can see how strong is the evidence for the view that his fast is valid and he does not have to make it up.
However, if the Muslim does that which is on the safe side and fasts a day in its stead, that will be better.
And Allaah knows best.
Reproduced from Islam QA