From 9aa17e389ee5a4a83b0714b77fcac0ca38527351 Mon Sep 17 00:00:00 2001 From: Ville Ranki Date: Sun, 5 Jan 2020 21:52:39 +0200 Subject: [PATCH] Fix datetime calling --- modules/googlecal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/googlecal.py b/modules/googlecal.py index 45790b5..52e7146 100644 --- a/modules/googlecal.py +++ b/modules/googlecal.py @@ -140,7 +140,7 @@ class MatrixModule: await bot.send_html(room, f'{self.parse_date(start)} {event["summary"]}', f'{self.parse_date(start)} {event["summary"]}') def list_upcoming(self, calid): - startTime = datetime.datetime.utcnow() + startTime = datetime.utcnow() now = startTime.isoformat() + 'Z' events_result = self.service.events().list(calendarId=calid, timeMin=now, maxResults=10, singleEvents=True, @@ -149,7 +149,7 @@ class MatrixModule: return events def list_today(self, calid): - startTime = datetime.datetime.utcnow() + startTime = datetime.utcnow() startTime = startTime.replace( hour=0, minute=0, second=0, microsecond=0) endTime = startTime + datetime.timedelta(hours=24)