What is the ruling on the one who eats before the adhaan of (Maghrib), because he committed a mistake; he heard a voice and thought that it was the adhaan and then broke his fast. Thereafter, it became clear to him that the Mu-addhin did not call the adhaan yet?
If the sun had already set, then his fasting is correct. And if the sun had not, then his fasting is incorrect. If he doubted whether the sun had set or not and continued upon this (doubt), then the fasting should be repeated out of precaution. Repeat this day’s (fasting), and this is (done) out of precaution.” [Al-Fataawaa Wad-Duroos Fil Masjidil Haraam of Shaikh Abdullaah Bin Muhammad Bin Humaid (rahimahullaah) page: 517]