increased nr of days to send to watch json

This commit is contained in:
Raphael Maenle 2020-05-21 10:19:37 +02:00
parent ba912de7f3
commit 060e506547

View File

@ -249,8 +249,13 @@ def generateJsonFromCalendarEntries(visibleCalendars, credentials = None):
now = datetime.datetime.now(datetime.timezone.utc).astimezone()
today = now.replace(hour=0, minute=0, second = 0).isoformat()
tomorrow = now.replace(hour=23, minute=59, second=59).isoformat() # + '+01:00'
twodaysfromnow = datetime.datetime.today() + datetime.timedelta(days=2)
twodaysfromnow = twodaysfromnow.replace(hour=23, minute=59, second=59).astimezone().isoformat()
allEvents = getCalendarEvents(service, visibleCalendars, today, tomorrow)
print(tomorrow, flush=True)
print('----')
print(twodaysfromnow, flush=True)
allEvents = getCalendarEvents(service, visibleCalendars, today, twodaysfromnow)
colorizeEvents(allEvents, service)
# if not events: