wernerhp / ha.integration.load_shedding

A Home Assistant integration to track your load schedding schedule.
MIT License
115 stars 21 forks source link

Times off by two hours. #24

Closed Capone1983 closed 2 years ago

Capone1983 commented 2 years ago

Hi

Times are off by two hours, unless I am doing something wrong. HA time zone is set to (GMT+02:00) Johannesburg

Capture Capture1

tinuva commented 2 years ago

Times look correct to me. The 2 hour difference you see, is because the entity is showing UTC times.

2022-09-16T00:00:00 is UTC time format. It even shows this by appending the +00:00 at the end. You need to add 2 hours to get the SAST / South African timezone time. SA is UTC+2.

Capone1983 commented 2 years ago

But if the time is returned from eskom as UCT+2 Why have the entity as UCT?

If the time returns from Eskom as UCT then forget the above. :)

wernerhp commented 2 years ago

Eskom returns it in GMT+2 but HA uses UTC in the sensor attributes (see sun.sun). Should show correctly when using as_local in templates

https://www.home-assistant.io/docs/configuration/templating/#time