Automation condition unclear

I have an automation which should be enabled only in a certain time of day which spans over midnight.
Config looks like this (configured via frontend):

condition: time
after: '22:00:00'
before: '06:00:00'

It doesn’t seem to work and the trace gave me this:

after:
  __type: <class 'datetime.time'>
  repr: datetime.time(22, 0)
now_time:
  __type: <class 'datetime.time'>
  repr: datetime.time(20, 57, 58, 789787)
before:
  __type: <class 'datetime.time'>
  repr: datetime.time(6, 0)
result: false

Documentation states that the config should be valid: Time condition windows can span across the midnight threshold if both after and before keys are used.

What am I doing wrong here?

It spans after 22:00 to 06:00 tomorrow morning. From your logs it shows that the current time is 20:57?

I think, the problem here is that somehow the automation doesn’t respect my timezone as I’m UTC+2. This got me confused because the log was from 22:57.

Go to Configuration—> General —> Timezone
Is it displaying your current timezone?