From d5cbe21b675f588d89f2a4782b2461df0ad3c68e Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sun, 18 Sep 2022 14:29:15 -0600 Subject: [PATCH] Fix no next meeting bug --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 4ee3f35..bc4c1bc 100755 --- a/main.py +++ b/main.py @@ -47,6 +47,8 @@ with open(location + '/lastquestion.txt') as f: def format_date(datestr): + if not datestr: return 'None' + d = datetime.strptime(datestr, '%Y-%m-%dT%H:%M:%SZ').replace(tzinfo=pytz.UTC) d = d.astimezone(TIMEZONE_CALGARY) return d.strftime('%a %b %-d, %Y %-I:%M %p')