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

fix: handle EU server time issue #642

Closed
wants to merge 6 commits into from
Closed

fix: handle EU server time issue #642

wants to merge 6 commits into from

Conversation

cdnninja
Copy link
Collaborator

@cdnninja cdnninja commented Oct 4, 2024

Sometimes EU reports old time stamps

@cdnninja
Copy link
Collaborator Author

cdnninja commented Oct 4, 2024

@ZuinigeRijder you are thinking move this logic to the vehicle setting?

@ZuinigeRijder
Copy link
Collaborator

Yes, I can make a proposal (new) Pull request?

@cdnninja
Copy link
Collaborator Author

cdnninja commented Oct 4, 2024

Of course! This is as much yours as mine! I don't have one of these cars anymore so can't say I spend much time on it. I just increased your access to admin on this repo as well.

@@ -49,7 +49,7 @@ def _get_authenticated_headers(
def _update_vehicle_properties_ccs2(self, vehicle: Vehicle, state: dict) -> None:
if get_child_value(state, "Date"):
# `Date` field is in UTC time
if vehicle.last_updated_at:
if not vehicle.last_updated_at:
vehicle.last_updated_at = parse_datetime(
get_child_value(state, "Date"), dt.timezone.utc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was wrong, someone else already reported that this was wrong for ccs2, it should be self.data_timezone

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you miss one use-case, I created a new Pull request with my proposal:
#643

@cdnninja cdnninja closed this Oct 5, 2024
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

Successfully merging this pull request may close these issues.

2 participants