Do I have a timezone problem (or something else)?

I want to extract the hour and minute from an input_datetime helper “alarm_time” as a string e.g “09:00”.
I have the following template:

{{ (state_attr(‘input_datetime.alarm_time’, ‘timestamp’) | timestamp_custom(‘%H:%M’)) }}

If the helper contains the time 09:00, I receive the time string “10:00” as output from the template. My timezone is GMT+00:00 and this is set correctly in home assistant settings. What is going on?

think you need to add

{{ (state_attr(‘input_datetime.alarm_time’, ‘timestamp’) | as_local | timestamp_custom(‘%H:%M’)) }}