benct / lovelace-multiple-entity-row

Show multiple entity states and attributes on entity rows in Home Assistant's Lovelace UI
MIT License
768 stars 55 forks source link

Wrong time formatting #313

Open luigixx73 opened 10 months ago

luigixx73 commented 10 months ago

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.

ildar170975 commented 10 months ago

It is not adjusting time zone.

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

luigixx73 commented 10 months ago

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

ildar170975 commented 10 months ago

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

luigixx73 commented 10 months ago

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

ildar170975 commented 10 months ago

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.