a-p-z / datetime-card

A minimalistic card for Home Assistant Lovelace UI which shows how many days it has been between any input_datetime and today.
21 stars 1 forks source link

datetime being set to midnight UTC #6

Closed kaizersoje closed 1 year ago

kaizersoje commented 2 years ago

I have noticed that on resetting an entity, it is being reset to midnight UTC and not taking into account the local time. For eg: I reset an entity at 8AM 6/6/22 (UTC+10). However, the state of the entity shows as 5/6/22 in developer tools.

a-p-z commented 2 years ago

Yes, I know. As first implementation I did not take in consideration the local time. I will fix it in the next release. https://github.com/a-p-z/datetime-card/blob/main/src/datetime/datetime.ts#L14