Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turkey (Diyanet İşleri Başkanlığı) times for fajr and isha are far off #62

Open
musa11971 opened this issue Jun 13, 2021 · 9 comments

Comments

@musa11971
Copy link

musa11971 commented Jun 13, 2021

So I'm not sure what's causing this strange issue, but the times for fajr and isha seem to be incorrect when using Diyanet İşleri Başkanlığı ("Turkey" method) from Amsterdam.

Consider the following example:

// Today
let cal = Calendar(identifier: .gregorian)
let date = cal.dateComponents([.year, .month, .day], from: Date())
		
var params = CalculationMethod.turkey.params

// Coordinates: 52.370788279620946, 4.889882572782284 (Amsterdam)
let times = PrayerTimes(coordinates: Coordinates(latitude: 52.370788279620946, longitude: 4.889882572782284), date: date, calculationParameters: params)!

This produces incorrect times. Below I have put them next to the correct times (according to diyanet.gov.tr):

Adhan-Swift Diyanet.gov.tr
Fajr 01:41 ❌ 03:47 ✅
Dhuhr 13:46 ✅ 13:45 ✅ (diff: 1)
Asr 18:09 ✅ 18:09 ✅ (no diff)
Maghrib 22:10 ✅ 22:10 ✅ (no diff)
Isha 01:41 ❌ 23:24 ✅

This seems very odd to me, because the values for fajr and isha are identical, and they are also both far off from the correct time.

This issue may be related/useful.

@z3bi
Copy link
Contributor

z3bi commented Jun 14, 2021

Amsterdam is at a very high latitude and generally that would mean you should implement the highLatitudeRule parameter. However even trying those options I'm not finding an exact match with the Diyanet times. I will continue to look into this further.

@musa11971
Copy link
Author

Looks like params.highLatitudeRule = .seventhOfTheNight gives the best results. But fajr and ishaa are still hours off. They are however no longer the same value (like they were without the highLatitudeRule).

@z3bi
Copy link
Contributor

z3bi commented Jun 16, 2021

@musa11971 a change was recently made in the develop branch that will try and apply a highLatitudeRule based off of the supplied coordinates if one is not manually specified. So that should the incorrect times. But to match what Diyanet has we need to figure out what they're doing for high latitudes, which seems to be a different approach.

@musa11971
Copy link
Author

I don't speak Turkish myself, so I mailed the Dutch Diyanet branch on monday to see if they have more information on how they calculate the times. Hopefully they can help.

What I also noticed is that Muslim pro, when set to Diyanet, also fails to get the correct times:

Muslim Pro:
Screenshot 2021-06-16 at 21 11 23

Diyanet official:
Screenshot 2021-06-16 at 21 11 42

So yeah, seems like they face the same challenge :)

@Frequence-xx
Copy link

Frequence-xx commented Aug 3, 2021

I have a similar issue, but we use the French calculation (Union des Organisations Islamiques de France) based on 12 degrees in the Netherlands, but the times are off only around summertime. Islamic Finder has the correct time for fajr and isha based on the french calculation method which is in accordance with eye-sighting. Any ideas?

Prayer times on July 13th 2021

  Adhan-Java | Islamic Finder

Fajr | 03:39 ❌ | 04:13 ✅
Isha | 23:50 ❌ | 23:16 ✅

@amacanada
Copy link

I posted the explanation here from Diyanet's website regarding how they determine isha and fajr: achaudhry/adhan#2 (comment)

@metin-atalay
Copy link

metin-atalay commented May 1, 2023

I have the same issue .

let coordinates = Coordinates(latitude: 40.8809, longitude: 29.2577)

image

@oalejel
Copy link

oalejel commented Oct 25, 2023

+1, the Diyanet inaccuracies are still off by a few minutes. Let's explore how to better calculate times based on the official Turkish method.

@mertnacakgedigi
Copy link

any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants