Pysolar is a collection of Python libraries for simulating the irradiation of any point on earth by the sun. It includes code for extremely precise ephemeris calculations.
Hi, I've been using the get_sunrise_sunset_transit function to calculate the sunrise, sunset and transit time in my current location, using my local timezone.
The problem is that this function calculates the sunrise, sunset and transit time of the UTC day in local time, but would be more logic to calculate the sunrise, sunset and transit time of the current local day in local time.
For example:
I'm in Madrid timezone (+1), and when I calculate the sunrise time at local time 29/11/2020_00:30:00 (UTC 28/11/2020_23:30:00) it correctly gives me back the sunrise time in local time, but from the day 28 not from the 29.
I've removed 'utc' from 'utctimetuple()' which gets rid of that behavior.
I don't really know if this behavior has been implemented on purpose but for the current program I'm making it makes no sense.
Thanks
Hi, I've been using the get_sunrise_sunset_transit function to calculate the sunrise, sunset and transit time in my current location, using my local timezone. The problem is that this function calculates the sunrise, sunset and transit time of the UTC day in local time, but would be more logic to calculate the sunrise, sunset and transit time of the current local day in local time. For example: I'm in Madrid timezone (+1), and when I calculate the sunrise time at local time 29/11/2020_00:30:00 (UTC 28/11/2020_23:30:00) it correctly gives me back the sunrise time in local time, but from the day 28 not from the 29.
I've removed 'utc' from 'utctimetuple()' which gets rid of that behavior. I don't really know if this behavior has been implemented on purpose but for the current program I'm making it makes no sense. Thanks