bimmerconnected / bimmer_connected

🚘 Library to query the status of your BMW or Mini from the ConnectedDrive portal
Apache License 2.0
373 stars 81 forks source link

Update timezone handling for time only data #617

Closed rikroe closed 5 months ago

rikroe commented 5 months ago

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

Additional information

Checklist