The entry time of the prayer in Islam is a prerequisite condition for performing obligatory prayers, and prayer times to be performed in Islam coincides with the time changes of the position of the sun. The elliptical and equatorial coordinates of the sun were calculated for different latitudes. The prayer times for the city of Baghdad were calculated at (latitude = 33.34º N, longitude = 44.43 E) with high accuracy for the year 2021 AD. The results showed that all prayer times are affected by latitude according to each region except (Dhuhr prayer (, it changes with the change of the equation of time, because the equation of time does not depend on latitude, but rather on the sun’s declination, which depends on date. We also made improvements to the accuracy of calculating prayer times, where the disappearance of evening twilight (Isha prayer) was calculated when the sun was below the western horizon at an angle of (170 ) and for )Fajr prayer( at an angle of (180) below the eastern horizon. Minutes were added to enable entering the time for )Dhuhr prayer( (5 minutes) and )Asr prayer( (3 minutes).
The results show that the shadow of the meridian varies every day of the year from one point to another on the surface of the globe, so it is non-existent if the sun is perpendicular to the earth at the time of the meridian, and it has a specific length if the latitude of the place exceeds the value (23.50) the Tropic of Cancer or the Tropic of Capricorn), and its length increases as we move towards higher latitudes.
In addition, the results of our program were compared with the program of the Islamic project for all prayer times for the cities of Baghdad and Mosul for one year, and it showed a good match for the results, with a difference in some times and days of no more than one minute due to the modifications we added to calculate the effect of altitude above sea level. Practical observation was also conducted to check the times of the Dhuhr, Asr and Maghrib prayers for several days during the year 2021 AD, and the results were identical with our theoretical results.