FL550 / dwd_weather

Deutscher Wetterdienst integration for Home-Assistant
MIT License
173 stars 11 forks source link

Missing timezone #47

Closed Chreece closed 2 years ago

Chreece commented 2 years ago

Version of home_assistant

2022.03.07

Version of the custom_component

1.2.18

Describe the bug

A clear and concise description of what the bug or error is and when it happens.

The timestamps (datetime) of the forecasts are missing the zone info which can produce problems with automations - other integrations when comparing datetimes (they need tzinfo).

Debug log

Current format:


  - datetime: '2022-04-03T00:00:00Z'

Suggested format:

  - datetime: '2022-04-03T00:00:00+00:00'
FL550 commented 2 years ago

Hi, so the Z mark for UTC isn't enough?

Chreece commented 2 years ago

Sorry my bad. It's also acceptable from HA. The method that was used by a custom component to grab the datetime from the sensor couldn't catch the Z as zone info. After reporting the issue the owner changed the method and now it works as it should. The change could still happend since the most datetime variables in HA are using the (+-)time format for the tzinfo. Maybe it will be standarized in the future. But still that's your decision :)

Thank you for your time!

Chreece commented 2 years ago

Did a greek translation to help the project as a sorry for the false issue reported :)