From 060e506547778df6914f848e6e21d719a47a9446 Mon Sep 17 00:00:00 2001 From: Raphael Maenle Date: Thu, 21 May 2020 10:19:37 +0200 Subject: [PATCH] increased nr of days to send to watch json --- caltojson.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/caltojson.py b/caltojson.py index 4fac74b..c1dfb41 100644 --- a/caltojson.py +++ b/caltojson.py @@ -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: