I have a REST sensor, which grabs JSON data, one piece of data outputs a datetime stamp as follows:
“last_submit”: “Tue, 23 Apr 2019 15:22:31 GMT”,
I do not live in the GMT timezone however and would like it to be offset to the timezone I am in, is this possible with a template? Do I manually have to set the offset in hours or can I specify my timezone and will a function automatically keep in mind DST as well?
That doesn’t work properly. No matter what timezone moniker you use, it doesn’t work. Not sure why to be honest. Gotta replace it with the timezone as a number and it will work.
Did some light-reading about it and, in short, strptime’s timezone conversion (%z %Z) seems to be hit or miss, depending on the implementation (i.e. as you said, it’s a complete miss in this case). Anyone wishing to learn more about, this is a good starting point: