From 6c8b44bcc0aedfd12be8dbde799553b7ef05cd7c Mon Sep 17 00:00:00 2001 From: Matthias Bilger Date: Wed, 1 May 2019 21:45:02 +0200 Subject: [PATCH] fixed start date for calendar --- infomentor/connector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infomentor/connector.py b/infomentor/connector.py index 5ec27d7..a2abc32 100644 --- a/infomentor/connector.py +++ b/infomentor/connector.py @@ -304,8 +304,8 @@ class Infomentor(object): data = { 'UTCOffset': utcoffset, } - schoolyear = int(startofweek.strftime('%Y')) - if int(startofweek.strftime('%m')) <= 7: + schoolyear = int(datetime.datetime.now().strftime('%Y')) + if int(datetime.datetime.now().strftime('%m')) <= 7: schoolyear -= 1 data['start'] = '{}-08-01'.format(schoolyear) data['end'] = '{}-07-31'.format(schoolyear+1)