remove old sun lookup

This commit is contained in:
SpudGunMan
2024-06-25 12:11:12 -07:00
parent f8cc559025
commit a2ea29ff4b

View File

@@ -57,21 +57,6 @@ def drap_xray_conditions():
xray_flux += "error fetching"
return xray_flux
# def get_sunrise_sunset(lat=0, lon=0):
# from suntime import Sun, SunTimeException # pip install suntime
# if lat != 0 and lon != 0:
# sun = Sun(lat, lon)
# else:
# sun = Sun(LATITUDE, LONGITUDE)
# to_zone = tz.tzlocal()
# today_sr = sun.get_sunrise_time(datetime.now())
# today_ss = sun.get_sunset_time(datetime.now())
# if today_ss < today_sr: # if sunset is before sunrise, then it's tomorrow
# today_ss = today_ss + timedelta(1)
# todaysun = [today_sr.astimezone(to_zone).strftime('%a %d %I:%M'), today_ss.astimezone(to_zone).strftime('%a %d %I:%M')]
# return todaysun
def get_sun(lat=0, lon=0):
obs = ephem.Observer()
obs.date = datetime.now()