Clean up timestamp formatting in Google Calendar bot.

This commit is contained in:
Elliott Jin 2017-02-27 22:26:51 -08:00 committed by Tim Abbott
parent 8514df180b
commit 2ea0430bf1
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ def populate_events():
creds = credentials.authorize(httplib2.Http())
service = discovery.build('calendar', 'v3', http=creds)
now = datetime.datetime.utcnow().isoformat() + 'Z' # 'Z' indicates UTC time
now = datetime.datetime.now(pytz.utc).isoformat()
feed = service.events().list(calendarId=options.calendarID, timeMin=now, maxResults=5,
singleEvents=True, orderBy='startTime').execute()