Your fast would have been invalid if it was something you done intensionally with full knowledge. I will give reference for this soon insha-Allah. A sahabi woke up for suhur and ate till morning when the thread of sunrise was visible, because he mis-understood what the Prophet (saw) had said about the thread of dawn and had place two treads (black and white) and kept looking back and forth, but till morning he could see no difference. Later on he discovered that the Prophet (saw) was telling them about the change which appears in the sky at the time of dawn. His fast was still valid, as his intension was right, but his understanding was not. Similarly with the people who prayed Salah without ablution because they did not know any alternative system (tayammum), their prayer was still accepted.

Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.