hebcal/hebcal-js

Wrong CandleLightning for Jerusalem

terminaltor opened this issue · 2 comments

When I set coords to Jerusalem coords the time returns for CandleLightning is 20 minutes late.
Also in your REST API, for example:
When I set the city by name its OK -
https://www.hebcal.com/shabbat/?cfg=json&geo=city&city=IL-Jerusalem&m=50
When I set the coords return from the request above its NOT OK -
https://www.hebcal.com/shabbat/?cfg=json&geo=pos&latitude=31.76904&longitude=35.21633&tzid=Asia/Jerusalem&m=50

May god be with you all the time :)

I believe that the REST API is actually driven by hebcal/hebcal rather than by hebcal-js.

I don't know how they determine the offset for candlelighting (relative to Sunset) but it's not surprising that specifying the city name works (to trigger the 40 minute offset) but specifying a latitude/longitude that happens to be within the city doesn't trigger it. (I agree it's a bug, I'm just not sure how fixable it is.)

The REST API is the hebcal/hebcal repository. Feel free to report this issue there.

In HebcalJS, you can set the candle lighting time to be a 40 minute offset by setting Hebcal.holidays.Event.candleLighting = 40;.