You’re probably going to need to debug the lines where I calulate the current time and the end time. I’m not sure how you are storing dates and I am unfamiliar with how you are displaying dates.
I did just notice this though
$end_time - strtotime(get_sub_field('ende'));
$end_time = strtotime(get_sub_field('ende'));
There should be an
=‘ not a ‘ – ‘