benct / lovelace-multiple-entity-row

Show multiple entity states and attributes on entity rows in Home Assistant's Lovelace UI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong time formatting

luigixx73 opened this issue · comments

if time is 2023-08-26T13:51:28+02:00 using format: datetime shows local date time but UTC ( 26 de agosto de 2023, 13:51)
It is not adjusting time zone.

It is not adjusting time zone.

Why it should?
This is a local time: "13:51:28".
This is UTC time: "11:51:28"

Nope, UTC Time is 13:51:28 , my local time is +2.00 hours.
New example just now : 2023-09-01T14:09:43+02:00
It shows 1 de septiembre de 2023, 14:09 but local time is 16:09

Check this:
image
Now my local time is 17:59.

I know where the issue is.
My payload is not giving the date in ISO 8601 format, thus the date is interpreted as locale
So I will convert 2023-09-01T14:09:43+02:00 to 2023-09-01T14:09:43.000Z which is ISO 8601 UTC time
Thanks anyway for your kind help

In this notation 2023-09-01T14:09:43+02:00 it is considered that 14:09:43 is a local time, and +02:00 gives you an offset.
So the UTC time is 2023-09-01T12:09:43+00:00.
Seems that the timestamp value is not properly composed.