The execution time mentioned on top is right between the possible range, so it looks indeed like it ran at the right time but that you are interpreting now() values in the wrong time zone.
You need to realize a time without a date (what you specified for before and after) cannot convert to UTC because there is no date. Converting those to UTC would cause weird time shifts during daylight savings changes. Those are ‘as is’ and Home assistant interprets them to be intended as local time for any given day.
The current time and execution time have a date and is internally represented as UTC, because they represent a single specific point in time. It needs to be converted to local time to display properly, and to be compared to before and after times properly.
Yes. It shows the time off by 4hrs. But the time looks right everywhere else and triggers automations at the right time. Just fails when it tries to compare due to the utc time.
What helper did you use? Because as I said, when you have daylight savings the offset changes.
I do not know exactly what you are converting, maybe the as_timestamp and timestamp_local filter can help?