0
Fixed

Zmanim API shows results for different dates

Steven DuBois 4 years ago updated by Michael J. Radwin 4 years ago 1

I am noticing that sometimes the zmanim API shows results for the next day for certain locations.

For example, tonight around 8:10 PM CT https://www.hebcal.com/zmanim?cfg=json&zip=60613 is showing results for 3/11/2021 and https://www.hebcal.com/zmanim?cfg=json&zip=60076 is showing results for 3/12/2021. These are two Chicago area zip codes, so they should both show results for the same date.

I believe this is likely a caching issue. When I inspect the headers I see these two values

last-modified: Thu, 11 Mar 2021 20:45:05 GMT

last-modified: Fri, 12 Mar 2021 02:10:26 GMT

Answer

Answer
Fixed

Hi Steven, thanks for catching this bug. The logic for picking today's date when there is no start, end or date parameter was defaulting to today's date in UTC instead of the date at the timezone based on the location.

The issue has been fixed now and those different URLs should give consistent results.

You can always specify an explicit date like https://www.hebcal.com/zmanim?cfg=json&zip=60613&date=2021-03-12 if you don't want the implicit "today" feature.

Answer
Fixed

Hi Steven, thanks for catching this bug. The logic for picking today's date when there is no start, end or date parameter was defaulting to today's date in UTC instead of the date at the timezone based on the location.

The issue has been fixed now and those different URLs should give consistent results.

You can always specify an explicit date like https://www.hebcal.com/zmanim?cfg=json&zip=60613&date=2021-03-12 if you don't want the implicit "today" feature.