fixed start date for calendar

This commit is contained in:
2019-05-01 21:45:02 +02:00
parent 016fdea661
commit 6c8b44bcc0

View File

@@ -304,8 +304,8 @@ class Infomentor(object):
data = { data = {
'UTCOffset': utcoffset, 'UTCOffset': utcoffset,
} }
schoolyear = int(startofweek.strftime('%Y')) schoolyear = int(datetime.datetime.now().strftime('%Y'))
if int(startofweek.strftime('%m')) <= 7: if int(datetime.datetime.now().strftime('%m')) <= 7:
schoolyear -= 1 schoolyear -= 1
data['start'] = '{}-08-01'.format(schoolyear) data['start'] = '{}-08-01'.format(schoolyear)
data['end'] = '{}-07-31'.format(schoolyear+1) data['end'] = '{}-07-31'.format(schoolyear+1)