From a2ea29ff4b38b76cef4314795e31ec0a69b5b207 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Tue, 25 Jun 2024 12:11:12 -0700 Subject: [PATCH] remove old sun lookup --- solarconditions.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/solarconditions.py b/solarconditions.py index a521f30..800b5a6 100644 --- a/solarconditions.py +++ b/solarconditions.py @@ -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()