From 7f9475446daf1ec7d2153f24a7405ed857048709 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 6 Jul 2016 20:00:37 +0200 Subject: Fix error in days per months table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- blue.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blue.py b/blue.py index 8eb4d87..27d1823 100755 --- a/blue.py +++ b/blue.py @@ -217,7 +217,7 @@ else: m = 12 y -= 1 days = 29 if y % 400 == 0 or (y % 4 == 0 and not y % 100 == 0) else 28 - days = [31, days, 31, 30, 31, 30, 30, 31, 30, 31, 30, 31] + days = [31, days, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] d = days[m - 1] stop_date = (y, m, d) @@ -235,7 +235,7 @@ else: break (y, m, d) = stop_date days = 29 if y % 400 == 0 or (y % 4 == 0 and not y % 100 == 0) else 28 - days = [31, days, 31, 30, 31, 30, 30, 31, 30, 31, 30, 31] + days = [31, days, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] stop_time = d - 1 for i in range(m - 1): stop_time += days[i] @@ -245,6 +245,7 @@ else: stop_time *= 24 * 60 * 60 stop_time += 24 * 60 * 60 stop_time -= (time.altzone if is_summer else time.timezone) + print('Z ', time.gmtime(stop_time)) def get_elev(elev, start, morning): -- cgit v1.2.3-70-g09d2