-
Notifications
You must be signed in to change notification settings - Fork 25
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
Calculation method different? #2
Comments
Hey, sorry for the late response. What location are you using, just so I can debug on my end? Thanks@ |
Bro I set the calculation method my own:
The coordinates for our location is 48.210033, 16.363449 Asr is set to "Hanafi" The result is showing me It should be by the correct calculation: |
Sorry but your code is not working correct and is useless for the folk. |
@semaf Hey, I'm sorry I haven't been able to look at the issue due to some personal reasons. I'll look at it in the next couple of days and report back. Since you're using your own calculation method, I'd like to test it with your changes. Could you commit your code and send me the commit hash or create a pull request so that I can look into it? I have not heard any other complaints and I know there are many people out there using this so I assume it's broken for your specific use case. Happy to look into it if you can push your changes. Thanks! |
Thank you for your reply. Sorry for that. I am not able to pull it at the moment but can paste here the files. praytimes.py updateAzaanTimers.py Here is an example of the praytimes.py with Diyanet calculation method too but result is also not exact or not to change over any settings. |
Spent a few hours on this, can't figure out what's wrong. Will keep looking and let you know if I make any progress |
Asalaamu'alykum @achaudhry - Coding is not really my area of expertise. I've got everything working except I want to change ASR to Hanafi time. Everything else about your script is working fine
I just want Asr to be hanafi time, so it should be 18:04 |
Nevermind, figured it out
|
Wa Allaikum Assalam @cmadooly Sorry for the late response. The proper way to do it would be to add Hope this helps! |
@cmadooly By the way, essentially the end result is exactly the same so you can either go with your solution or mine. Both should work just fine. But it's usually better not to hard code anything in praytimes.py to keep that class generic, and put application specific setup such as calculation method, asr method, lat/lng etc in updateAzaanTimers.py Stay safe and healthy! |
Thank you. I reverted my change and used yours. |
So at least I got it running since couple of weeks with Logitech Media Server and AirPlay Speakers. Supporting multiple speakers around house. Also the Diyanet is working with the calculation. https://github.com/semaf/adhan/ Thank you bro for the code! |
No problem brother. Sorry I couldn't spend more time to help you but I'm so happy to hear that you got it to work. If the code is generic enough and you think it will help others in the future, do you want to submit a pull request with your change? I'll be happy to merge it. Thank you! |
Yes sure, please just that you know I am not a coder. |
Assalamun Alaykum, After long time I recognized that the calculation of praytimes.py is not doing his job correct. Did you recognize that too? |
Wa'salaam brother, which calculation method are you using. I and a few other family members have been using it for over 5 years without a problem. Curious what's different about your setup. JAK for bringing it up |
Wa'alykumasalaam. Mine has been running non-stop for several months with no issues as well.
|
Set 2 days ago to the correct time for coordinates 48.210033,16.363449 and I am calculating by Diyanet (Turkish) method "Standard" and to their source it should be for today: 04:17 | 05:47 | 12:58 | 16:49 | 20:00 | 21:20 but have it calculated 04:20 | 05:47 | 13:02 | 16:48 | 19:57 | 21:17 after a month it is how said more than 15-20 minutes. The offsets are too high and maybe this is calculating by the time different. The calculation method I add in praytimes.py is here
If I set today the offset, than it must be like below
Here is another discussion about it, but they have passed it without future problems. |
I was curious about this and searched their website. Diyanet's default method is 18 degrees for both fajr and isha. But at latitudes beyond 45 degrees north of the equator, they use a different method explained here: https://kurul.diyanet.gov.tr/Cevap-Ara/4093/45--enlemin-otesinde-namaz-vakitleri?enc=QisAbR4bAkZg1HImMxXRn2t8ij%2beDtMkJdRGirgyeb8%3d Here's a translation (slightly tweaked/clarified from Google Translate) of the relevant text: b) It is decided by majority vote that beyond the 45th latitude, in regions and periods where one third of the night exceeds 1 hour and 20 minutes, the start of isha is determined so as to not exceed 1 hour and 20 minutes from the time of maghrib, (I'm not 100% sure about the next bullet point, since the language isn't clear to me and the Google translation is a mess) c) It is unanimously decided that fajr between March and September is to be determined by adding 10 minutes to the time determined in (a) and (b) (i.e., the time duration between maghrib and isha) and subtracting it from the time of sunrise. The transition to this calculation method is to be done gradually/progressively (it doesn't elaborate on what it means by "gradually"). (Note that I'm pretty sure that this item is still referring specifically to regions beyond 45 degrees north of the equator, and my understanding is that outside of this March-September time frame, they use 18 degrees for fajr.) d) It is unanimously decided to use the times of the 62nd latitude beyond the 62nd latitude, e) It is unanimously decided that it will not be seen as wrong or erroneous for individuals and committees with scientific competence to determine different times for these regions by using different calculation methods, and to worship accordingly. Here are archive.org links (since the original URLs are no longer live) to the 2006 and 2009 decisions referred to in the page above: |
Hey,
I am having somehow totally wrong times.
The script gives:
03:13
12:51
16:54
20:15
22:31
Should be:
03:52
05:22 (sun)
12:56
16:57
20:21
21:41
Selected is Karachi
The text was updated successfully, but these errors were encountered: