I don’t use hassio either. Just out of curiosity, what do you get when you enter the following into the Template Editor? (You can just tell me if they agree or not if you don’t want to share your time zone.)
BTW, I think you showed how you install stuff, but now how you run it. See the following comment from above:
I know I’ve seen many examples of people using docker and/or hassio and the time zone setting inside HA’s docker container was set incorrectly. I’m glad I haven’t messed with that stuff.
well, none of that is controlled by a hassio user.
EDIT: I Just noticed that he never specified hassio. Only docker and home assistant. So I think we found the cause. It’s his docker container not being started with @eifinger’s command.
well, then the only option could be incorrect install or the date not set in home assistant. As far as I know, hassio users have no control over how the docker containers run. Even on Ubuntu. I’m sure if users were experts in docker they could mess with it. But that doesn’t seem to be the case here.
That clearly shows that the time zone setting in the context in which HA runs is wrong. I believe he claims that the time zone setting in the OS is correct. Unless he’s wrong, and the time zone setting in the OS is indeed wrong, then that only leaves the docker context to explain why he got UTC for the second expression.
Now, although that should be fixed (because it can lead to other issues), I’m not sure it’s really the reason for the problem noted in the OP. I think you’re probably right that it has more to do with the time zone setting in the Alexa app. Although he claims that’s right.
So although you do need to eventually figure out why the time zone isn’t set correctly in docker (because it can cause other issues), according to @petro’s post about the code, which I reviewed, it does seem like the more likely reason is due to the time zone setting in the “app”, whatever that is. Did you check to see if the warning mentioned was in your logs?
_LOGGER.warning(
"%s does not have a timezone set. "
"Returned times may be wrong. "
"Please set the timezone in the Alexa app.",
self._client.name,
)
EDIT: Or maybe it’s just wrong? I think you said you checked that, but…