Title: [Bugfix] Wrong ISO time format in Python quickstart for Calendar API · Issue #2115 · googleworkspace/python-samples · GitHub
Open Graph Title: [Bugfix] Wrong ISO time format in Python quickstart for Calendar API · Issue #2115 · googleworkspace/python-samples
X Title: [Bugfix] Wrong ISO time format in Python quickstart for Calendar API · Issue #2115 · googleworkspace/python-samples
Description: 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 t...
Open Graph Description: 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)...
X Description: 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)...
Opengraph URL: https://github.com/googleworkspace/python-samples/issues/2115
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bugfix] Wrong ISO time format in Python quickstart for Calendar API","articleBody":"Hi team,\n\nWhile testing the Calendar API using the [Python quickstart guide](https://developers.google.com/workspace/calendar/api/quickstart/python?hl=en), I noticed an issue in the time formatting line.\n\nThe current code is:\n\n```python\nnow = datetime.datetime.now(tz=datetime.timezone.utc).isoformat() + \"Z\" # 'Z' indicates UTC time\n```\nHowever, this results in an invalid ISO 8601 timestamp like:\n\nmakefile\n```\n2025-04-07T14:39:12.345678+00:00Z\n```\nAppending \"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.\n\nIt should be corrected to:\n\n```python\nnow = datetime.datetime.now(tz=datetime.timezone.utc).isoformat()\n```\nWhen the incorrect format is used, it leads to errors like this:\n\n```json\n{\n \"error\": {\n \"code\": 403,\n \"message\": \"Method doesn't allow unregistered callers (callers without established identity)...\",\n \"status\": \"PERMISSION_DENIED\"\n }\n}\n```\nI've submitted a PR with the fix—please take a look when possible!\n\nThanks!\n\n","author":{"url":"https://github.com/Marc416","@type":"Person","name":"Marc416"},"datePublished":"2025-04-07T14:01:29Z","url":"https://github.com/googleworkspace/python-samples/issues/2115"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e55b90d2-2f7b-805e-fe59-e16f357a7cca |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E776:2DCD5C:55F4E5:6DA71D:6B08B047 |
| html-safe-nonce | 084774d43eb2d596c70b1193ecd1e5906f802d74de64f7be42c4d03a979ddeb1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzc2OjJEQ0Q1Qzo1NUY0RTU6NkRBNzFEOjZCMDhCMDQ3IiwidmlzaXRvcl9pZCI6IjQ3NTA1NzUzNzEyNjYwNzY3NDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f56b3d7e7b7763d24c8fbb74d4196a8eb301844c8591bbd171f5af42e2786470 |
| hovercard-subject-tag | issue:2976981652 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleworkspace/python-samples/2115/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bb996dd8dafc05618001b892b66453327ccfbe0df086cce25bdac3494c890568/googleworkspace/python-samples/issues/2115 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bb996dd8dafc05618001b892b66453327ccfbe0df086cce25bdac3494c890568/googleworkspace/python-samples/issues/2115 |
| og:image:alt | 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)... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Marc416 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60e86161f3e246339ce8d4bd308e3da0ecd5ebd5e610d57e00d21487fe085d68 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleworkspace/python-samples git https://github.com/googleworkspace/python-samples.git |
| octolytics-dimension-user_id | 3708359 |
| octolytics-dimension-user_login | googleworkspace |
| octolytics-dimension-repository_id | 14163863 |
| octolytics-dimension-repository_nwo | googleworkspace/python-samples |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14163863 |
| octolytics-dimension-repository_network_root_nwo | googleworkspace/python-samples |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e87e2b0f8aff9e45b7ac6c81be5a939ad971830c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width