Hello I am struggling to get a timestamp from a few hours:
{{ as_timestamp( strptime('10', '%H') ) }}
returns an empty string. Why ?
Hello I am struggling to get a timestamp from a few hours:
{{ as_timestamp( strptime('10', '%H') ) }}
returns an empty string. Why ?
It should be returning -2208931200.0
You can paste that code into the template interpreter to confirm.
What is the context?
It returns empty result in the template interpreter too.
If I make a syntax error I get the proper error back. So it is updating properly. I use 0.51.2
I had a look to the http response and haas returns an error:
<html><head><title>500 Internal Server Error</title></head><body><h1>500 Internal Server Error</h1>Server got itself in trouble</body></html>
If I put
{{ strptime('10', '%H') }}
I get: 1900-01-01 10:00:00
In the logs:
OverflowError: timestamp out of range
I get the same, nothing in template editor
and the same here 1900-01-01 10:00:00
Interesting…
It looks like the size of the timestamp type varies by system type. I’m running Home Assistant on a 64 bit mac, so that might be the difference.
PI3 here, so 16bit I think
Oh this is because I run it on a PI3 … Bummer …