Is there a tool for figuring out what percentage of an online event intersects with shabbat across time zones?

Like something 17:00-18:00GMT is 100% overlap right now in every(?) European time zone but not for people in California.

Ideally, I'd like to know who has the highest degree of overlap and who has the lowest. This is slightly fiddly to code and thus I don't want to do it myself, so I'm hoping for a website or an app.

#Mazeldon #Jewniverse #Jewish

So I'm going to have to figure out the eastern and westernmost locations in every time zone and then also the northernmost and southernmost. And then pretend the time zone is a rectangle and those are the edges. And then for every shabbat / holiday, I need to figure out the earliest start and the latest end in that rectangle and then add some padding in case of elevation issues. And then I can say, more or less, the overlap in idealised Colorado with some online event. And I need to come up with a search algorithm to determine the borders? Or some way to calculate when I need to look at whether some time zone is obviously dark or if the clocks have changed for summer....

Actually, observance of summer time changes doesn't matter, but the geographic borders really do.

On the solstice, on one Arctic Circle, shabbat starts at noon, but in the opposite one, it starts at midnight.

@celesteh there are astronomical algorithms that I don't really understand for getting the position of the sun (etc) in the sky from coordinates on the earth and a time. IIRC the Python "skyfield" package was handy last time I checked (a few years ago).

I think there was another more serious package that I didn't figure out how to use, with tools like "if i want to observe X, what time should I book observatory Y", but I forget...

@mathr there's a command line program, called hebcal or similar that does this, so the hard part is going to be figuring out geographic borders.

@celesteh openstreetmap has a web API server, I used it once for a thing*. maybe you can query it and get the boundary of your target region as a path, then sample it?

* https://mathr.co.uk/lost/

Lost...

It's easy to get lost if you don't know the area.

@celesteh (I think I’m misunderstanding how the start of Shabbat is determined. I was under the impression that it depended on sunset time only, which is an absolute UTC-time function depending on location only, and doesn’t depend on local civil time zone. You’d only need time zone data to convert the event start/end into UTC and then all calculations thereafter are globally applicable irrespective of time zone.)

@celesteh Well, the US Navy had lookup tables for sunset and sunrise for a given longitude and latitude on any given date, that were easily lookupable by machines. A while back, but something like that should still exist somewhere.

I'd start by getting everyone's locations down to the city, looking up sunset in local time, converting everything into a common timezone, and then assess from there (assuming astronomical sunset is sufficient for shabbat purposes)

@celesteh and I thought that managing my calendar based in EST with kids in GMT and PST and work in CDT with many folks in IST was bad. Best of luck!

@celesteh I’m not aware of an all-in-one tool so you may have to continue to cobble a solution from bits.

If you need to know when sunset begins while factoring in terrain, there’s https://shademap.app/

Someone has put together shapefiles-to-tzdata-zone here https://github.com/evansiroky/timezone-boundary-builder

Simulate sun shadows

Every mountain, building and tree shadow in the world simulated for any date and time