Skip to content

Commit a6887a9

Browse files
authored
fix: datetime.datetime.utcnow
1 parent d6f8334 commit a6887a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

calendar/quickstart/quickstart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def main():
5353
service = build("calendar", "v3", credentials=creds)
5454

5555
# Call the Calendar API
56-
now = datetime.datetime.utcnow().isoformat() + "Z" # 'Z' indicates UTC time
56+
now = datetime.datetime.now(tz=datetime.timezone.utc).isoformat() + "Z" # 'Z' indicates UTC time
5757
print("Getting the upcoming 10 events")
5858
events_result = (
5959
service.events()

0 commit comments

Comments
 (0)