As far as Islamic Shari`ah is concerned, any Muslim who forgetfully eats or drinks during the daytime of Ramadan is to complete his or her fast and not to break it.However, he or she has to stop eating and stop drinking from the moment he or she realizes that this is fasting time.The Prophet (peace and blessings be upon him) is reported to have said, “If somebody eats or drinks forgetfully, then he should complete his fast, for what he has eaten or drunk has given to him by Allah” (Al-Bukhari and Muslim).

Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states: If a Muslims eats or drinks forgetfully, then it did not break your fast, as long as you stopped it [eating and drinking] from the moment you remembered that you were fasting. If, on the other hand, you continued to do so even after remembering, then, of course, your fast was broken and you have to make up for the same by fasting another day. 

Abu Hurayrah reported that Prophet Muhammad (peace and blessings be upon him) said,“If somebody eats or drinks forgetfully, then he or she should complete fasting, for what he or she has eaten or drunk has been given to him by Allah”(Al-Bukhari and Muslim).

Based on this, scholars are of the opinion that eating or drinking forgetfully does not invalidate one’s fast. It goes without saying that one must immediately abstain from doing so as soon he or she becomes conscious of it. In conclusion: Your fast is not broken as long as you did not consume anything after recognizing that you are supposed to be fasting.