Hi team,
While testing the Calendar API using the Python quickstart guide, I noticed an issue in the time formatting line.
The current code is:
now = datetime.datetime.now(tz=datetime.timezone.utc).isoformat() + "Z" # 'Z' indicates UTC time
However, this results in an invalid ISO 8601 timestamp like:
makefile
2025-04-07T14:39:12.345678+00:00Z
Appending "Z" after a timezone-aware ISO string (which already includes +00:00) makes the timestamp invalid. This can cause unexpected errors when calling the API.
It should be corrected to:
now = datetime.datetime.now(tz=datetime.timezone.utc).isoformat()
When the incorrect format is used, it leads to errors like this:
{
"error": {
"code": 403,
"message": "Method doesn't allow unregistered callers (callers without established identity)...",
"status": "PERMISSION_DENIED"
}
}
I've submitted a PR with the fix—please take a look when possible!
Thanks!
Hi team,
While testing the Calendar API using the Python quickstart guide, I noticed an issue in the time formatting line.
The current code is:
However, this results in an invalid ISO 8601 timestamp like:
makefile
Appending "Z" after a timezone-aware ISO string (which already includes +00:00) makes the timestamp invalid. This can cause unexpected errors when calling the API.
It should be corrected to:
When the incorrect format is used, it leads to errors like this:
{ "error": { "code": 403, "message": "Method doesn't allow unregistered callers (callers without established identity)...", "status": "PERMISSION_DENIED" } }I've submitted a PR with the fix—please take a look when possible!
Thanks!