def update_as_of(self, utc_point_in_time):
Calculate sun state at a point in UTC time.
sun = ephem.Sun() // pylint: disable=no-member
// pylint: disable=assigning-non-slot
self.observer.date = ephem.date(utc_point_in_time)
After Change
break
mod += 1
mod = -1
while True:
next_setting_dt = (self.astral.sunset_utc(
utc_point_in_time +
timedelta(days=mod), self.latitude, self.longitude))
if next_setting_dt > utc_point_in_time:
break
mod += 1
self.next_rising = next_rising_dt
self.next_setting = next_setting_dt