mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-04-30 10:33:44 +02:00
remove old sun lookup
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user