I’d like to ideally have some script I can hard-code my latitude/longitude in and have it return the correct sunrise and sunset times for that location throughout the year, maybe even print up a schedule for the week/month/year but at least be able to know for the curren day
Where is that weather data available to scrape?
You must log in or register to comment.
hdateshould be available on your system:$ hdate -s -l 64 -L -21 -z 0 # iceland, timezone is +0 utc Tuesday, 6 October 2026, eve of 26 Tishrei 5787 sunrise: 07:46 sunset: 18:36 hdate: ALERT: The information displayed is for today's Hebrew date. Because it is now after sunset, that means the data is for the Gregorian day beginning at midnight.Gives a little more info than you want, but it is pretty easy to clean up.
$ hdate -q -s -l 64 -L -21 -z 0 | grep sun sunrise: 07:46 sunset: 18:36I don’t think it handles daylight savings, but you can adjust for that.
Thanks!
Searching apt packages in Debian, it looks like there’s a Python library “suntime”.


