KoljaWindeler / ics

Integration that displays the next event of an ics link (support reoccuring events)
51 stars 12 forks source link

Time Not Showing as Local Time - Seems to be UTC only in state #42

Open Joshndroid opened 2 years ago

Joshndroid commented 2 years ago

I am assuming that this is probably going to be a config error on my part but I just can't seem to get this to work correctly as the state value.

I have the state setup such as this for time format - %a %B %d %I:%M%p It then provides the nice output within the state - Sun March 13 05:05AM

^^^ how I have that set out there is exactly how I want it, just with the correct time. it should be 3:05pm or atleast 15:05

The problem however is that it is 10 hours off... my exact offset from UTC (being +1000)

The start time attribute is correct and shows the offset start: 2022-03-13T15:05:00+10:00

So i know its pulled the data across.

I have checked the home assistant timezone which is set correctly for my locality for offset. Is there a way to add the offset the state time?

Cheers for the awesome integration.

jeroenvdd commented 2 years ago

I seem to notice the same thing, the events are shown correctly as in 'next event is' but the hour mentioned is of by 1 hour for me

jeroenvdd commented 2 years ago

found a way to fix this but its the dumbest way ever, splitting out the string and doing +1...

Joshndroid commented 2 years ago

so do you mean adding +1 to the end of the "%a %B %d %I:%M%p"