Closed toddstar closed 1 year ago
All times are in UTC. The integration does not know what timezone you are viewing from, so you need to do the conversion yourself. I think there is a ‘to local’ option you can use in any automations. I’m travelling at the moment but I know someone mentioned it on a similar type of post on the O365 integration I look after.
All times are in UTC. The integration does not know what timezone you are viewing from, so you need to do the conversion yourself. I think there is a ‘to local’ option you can use in any automations. I’m travelling at the moment but I know someone mentioned it on a similar type of post on the O365 integration I look after.
ok cool. Was assuming it was converting from unix to local datetime but if not will look at updating my 'time to next recording' template so that its using local datetime with DST
It does a Unix conversion, but Unix is in UTC. 😀
Had a scan over the code and the issue is that strftime isn't adding the timezone data so that %z format isn't being added to the date stored in HA. i.e. its saving skyq_scheduled_start: '2023-03-31T17:00:00'
rather than skyq_scheduled_start: '2023-03-31T17:00:00+00:00'
so conversation to local time doesn't work.
I've done a quick and very dirt fix (changed CONST_DATE_FORMAT = "%Y-%m-%dT%H:%M:%S%z"
to CONST_DATE_FORMAT = "%Y-%m-%dT%H:%M:%S+00:00"
) to allow my time to next recording template sensor to be correct. May attempt a proper fix later but probably over my tinkering skills
Ok, I’ll take a look at it over the weekend.
Latest release (currently in prerelease) should output in timezone (UTC) aware format - https://github.com/RogerSelwyn/Home_Assistant_SkyQ_MediaPlayer/releases/tag/v2.10.13
Just updated and now outputting with timezone :thumbsup:
Describe the bug
Looks like next recording isn't including DST so after the recent clock change in UK recordings are now listed as an hour earlier than they're actual start time. E.g. my next recording is 10am today but has 9am start time under the scheduled sensor so power automations are firing early.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Unix Time conversion to include DST adjustment when in use
Screenshots
Component versions
Your configuration
UI
Your configuration from the options dialogue
Additional context
Next Recording Data
config_entry-skyq-174343bd318c4652729ac0ee0a62e671.json.txt