diff --git a/suncalc.py b/suncalc.py index bb88964..b828e33 100644 --- a/suncalc.py +++ b/suncalc.py @@ -66,7 +66,7 @@ def hourAngle(h, phi, d): return ret except ValueError as e: print(h, phi, d) - print e + print(e) def solarMeanAnomaly(d): return rad * (357.5291 + 0.98560028 * d) @@ -132,11 +132,11 @@ def getTimes(date, lat, lng): result = dict() for i in range(0, len(times)): - time = times[i] - Jset = getSetJ(time[0] * rad, lw, phi, dec, n, M, L); - Jrise = Jnoon - (Jset - Jnoon); - result[time[1]] = fromJulian(Jrise).strftime('%Y-%m-%d %H:%M:%S'); - result[time[2]] = fromJulian(Jset).strftime('%Y-%m-%d %H:%M:%S'); + time = times[i] + Jset = getSetJ(time[0] * rad, lw, phi, dec, n, M, L); + Jrise = Jnoon - (Jset - Jnoon); + result[time[1]] = fromJulian(Jrise).strftime('%Y-%m-%d %H:%M:%S'); + result[time[2]] = fromJulian(Jset).strftime('%Y-%m-%d %H:%M:%S'); return result