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

Update timezone handling for time only data #617

Merged
merged 5 commits into from
May 26, 2024

Conversation

rikroe
Copy link
Member

@rikroe rikroe commented May 26, 2024

Proposed change

Updates handling for time-only data when returned as da datetime object (currently only charging_time_start).
It is now created without timezone (tzinfo=None) and only works correctly if both the current timezone of the computer and the car are the same.

Unfortunatly the BMW API does not seem to provide any additional data to figure out which timezone is used for these values.

Time-only data where we have a number of minutes remaining (i.e. 250 seconds of climatization) are not impacted, as we can deterministically calculate those.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to this library)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works.

@rikroe rikroe merged commit 91c26e8 into bimmerconnected:master May 26, 2024
11 checks passed
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.

1 participant