1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00

AEMET town timestamp should be UTC (#48916)

AEMET OpenData doesn't clarify if the hourly data timestamp is UTC or not, but
after correctly formatting the town timestamp in ISO format, it is clear that
the timestamp is provided as UTC value.
Therefore, the only values not provided as UTC are the ones related to the
specific daily and hourly forecast values.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
Álvaro Fernández Rojas 2021-04-09 12:37:46 +02:00 committed by GitHub
parent 2391134d26
commit e30cf88459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -239,7 +239,7 @@ class WeatherUpdateCoordinator(DataUpdateCoordinator):
return None
elaborated = dt_util.parse_datetime(
weather_response.hourly[ATTR_DATA][0][AEMET_ATTR_ELABORATED]
weather_response.hourly[ATTR_DATA][0][AEMET_ATTR_ELABORATED] + "Z"
)
now = dt_util.now()
now_utc = dt_util.utcnow()