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

Editing a todo list item due date and saving causes date to be out by one day. Google Tasks Integration. #125191

Closed
markusg1234 opened this issue Sep 4, 2024 · 10 comments · Fixed by #132498

Comments

@markusg1234
Copy link

The problem

When adding a todo item for google tasks and then saving a date.
What will save is the day before the date selected.

What version of Home Assistant Core has the issue?

core-2024.8.3

What was the last working version of Home Assistant Core?

unknown

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Tasks

Link to integration documentation on our website

https://www.home-assistant.io/integrations/google_tasks/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Steps to reproduce the issue

  1. Create a new todo list item. Integration is google tasks.
  2. Edit and add a date.
  3. Save the date.
  4. Now the date will be the day before the one that was selected.

did a test and the call_service showed the correct date entered when saved. Set the date to 30/08/2024.
In the Todo list after saving it shows 29/08/2024.

Also if I set the date to say 31/08/2024 and save it. It will appear as 30/08/2024. If I then edit again and just save it and not change the date it will then show 29/08/2024.

event_type: call_service
data:
domain: todo
service: update_item
service_data:
item: T3BiUTE1OEdPb0QyTjhYZg
rename: test
status: needs_action
description: null
due_date: "2024-08-30"
entity_id:

  • todo.my_tasks
    origin: LOCAL
    time_fired: "2024-08-28T00:20:14.041365+00:00"
    context:
    id: 01J6B5NEJS11A1DEPK6JBKNK7Q
    parent_id: null
    user_id: 1a662c9ead9543a6aff0859ff9fb7b86
@home-assistant
Copy link

home-assistant bot commented Sep 4, 2024

Hey there @allenporter, mind taking a look at this issue as it has been labeled with an integration (google_tasks) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of google_tasks can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign google_tasks Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


google_tasks documentation
google_tasks source
(message by IssueLinks)

@allenporter
Copy link
Contributor

I am not able to reproduce this in the UI following the steps you said. I suspect this may be something related to timezones, but I can't tell.

(1) Can you tell me a little more simply the steps to reproduce with a service call? Your words don't appear to match the service call sent below.
(2) Can you capture debug logs for Google Tasks? https://www.home-assistant.io/docs/configuration/troubleshooting/#debug-logs-and-diagnostics
(3) What timezone is home assistant set to?

@markusg1234
Copy link
Author

markusg1234 commented Sep 6, 2024

I will be able to capture the logs tomorrow.

I first logged the issue under frontend issues and the service call was suggested.
home-assistant/frontend#21803

The issue appears on my installation and on a friends.

The time zone is set to (GMT+10:30) Central Time -Adelaide.

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@StefanSarzio
Copy link

Problem still exists for me on 2024.12

@github-actions github-actions bot removed the stale label Dec 5, 2024
@allenporter
Copy link
Contributor

@StefanSarzio see #125191 (comment) and provide requested information. thanks!

@markusg1234
Copy link
Author

Forgot to follow up on this one. Only logs on each save were:

2024-12-06 18:23:55.306 DEBUG (MainThread) [homeassistant.components.google_tasks.coordinator] Finished fetching Google Tasks MTc5Nzc0ODY0ODI5MDU2NTI2MDI6MDow data in 0.463 seconds (success: True)

2024-12-06 18:23:58.351 DEBUG (MainThread) [homeassistant.components.google_tasks.coordinator] Finished fetching Google Tasks MTc5Nzc0ODY0ODI5MDU2NTI2MDI6MDow data in 0.474 seconds (success: True)

On each save the date changes to the day before.

Date is set to 10/12/2024
Save task
Date now is 09/12/2024
Save task
Date now is 08/12/2024

@StefanSarzio
Copy link

  1. Sorry, I cannot help here. I'm not the original poster and I don't quite get what I would have to do. I have the problem when creating to-do items manually from the HA web-interface. I add an entry by adding a title, then click + to add it. Then I select the new item and add a due date by clicking the small calendar icon on the right of the field. Then the text string for the correct date is shown in the text-field. Then I click save. Then in the overview the wrong date is shown. Also when opening the entry again it shows the wrong date in the text-field.
    (2) Done. The file is 45 MB in size and I'm not sure whether it contains any sensitive data. Also the file type is not supported for uploading: "We don’t support that file type.

Try again with GIF, JPEG, JPG, MOV, MP4, PNG, SVG, WEBM, CPUPROFILE, CSV, DMP, DOCX, FODG, FODP, FODS, FODT, GZ, JSON, JSONC, LOG, MD, ODF, ODG, ODP, ODS, ODT, PATCH, PDF, PPTX, TGZ, TXT, XLS, XLSX or ZIP."
(3) (GMT+01:00) Berlin

@allenporter
Copy link
Contributor

Forgot to follow up on this one. Only logs on each save were:

ok thanks, you're right google tasks is not configured correctly for debug logging. I will try to reproduce this myself by changing my timezone.

I think the issue is the timezone may be getting dropped in the round trip between google and home assistant so the timezone distance away from UTC is what may impact this. e.g. if you truncate my timezone at midnight i still get the same day, but not GMT+10 etc

@allenporter
Copy link
Contributor

I was able to reproduce the issue, and have a fix that appears to work. Thank you for the report.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants