Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timezone issue when trying to patch google tasks item #2533

Open
longfangsong opened this issue Dec 12, 2024 · 0 comments
Open

Timezone issue when trying to patch google tasks item #2533

longfangsong opened this issue Dec 12, 2024 · 0 comments
Assignees

Comments

@longfangsong
Copy link

longfangsong commented Dec 12, 2024

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please be sure to include as much information as possible:

Environment details

  • OS type and version: macOS 15.1.1 (24B91), arm64
  • Python version: Python 3.13.0
  • pip version: pip 24.2
  • google-api-python-client version: 2.155.0

Steps to reproduce

  1. Patch an item in a google tasks list with api
  2. Read the result

Code example

from googleapiclient.discovery import build
from google.oauth2.credentials import Credentials
creds = Credentials(TOKEN)
service = build('tasks', 'v1', credentials=creds)

result = service.tasks().patch(
            tasklist="ZERNSFhRUWduTVFuOVV0UQ",
            task="elo1NllBMlJ4TERCZ3Nucg",
            body={'title': 'Subitem', 'status': 'needsAction', 'due': '2024-12-14T00:00:00+01:00', 'notes': None, 'parent': 'OXRUelVzcFNjYWphbTl6Wg'},
        ).execute()
print(result)

Note the timestamp is 2024-12-14T00:00:00+01:00.

The result is:

{'kind': 'tasks#task', 'id': 'elo1NllBMlJ4TERCZ3Nucg', 'etag': '"LTExNjY2OTMyNjc"', 'title': 'Subitem', 'updated': '2024-12-12T10:41:34.000Z', 'selfLink': 'https://www.googleapis.com/tasks/v1/lists/ZERNSFhRUWduTVFuOVV0UQ/tasks/elo1NllBMlJ4TERCZ3Nucg', 'parent': 'OXRUelVzcFNjYWphbTl6Wg', 'position': '00000000000000000000', 'status': 'needsAction', 'due': '2024-12-13T00:00:00.000Z', 'links': [], 'webViewLink': 'https://tasks.google.com/task/zZ56YA2RxLDBgsnr?sa=6'}

Note the timestamp is 2024-12-13T00:00:00.000Z.

Stack trace

NA

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants