"days until" template is changing not at midnight, but at 11am

I use this template for a countdown.
For my understanding, it should change the result at midnight. But it changes at 11am.
Can somebody tell me why?

'{{ (( as_timestamp(strptime("2022-05-16 00:00:00" , "%Y-%m-%dT%H:%M:%S")) - as_timestamp(now()) )/ (3600*24)) | round(0) }}'

Assuming you are on different timezone other than utc, it is better to use as_local rather than as_timestamp

Local should return local time
Timestamp should return utc time

Seems to work

'{{ ( as_datetime("2022-05-16 00:00:00.0+01:00") - as_local(now()) ) }}'

but it evalutes as '124 days, 1:46:49.112656' is there a way to recieve only the days as a integer?

{{ ( as_datetime("2022-05-16 00:00:00.0+01:00") - as_local(now()) ).days }}

keep in mind it could be upwards of 24 hours off. I.e, it’ll be zero days at that point.

Its working, perfect. Thank you!