How Homey implements SUNSET and SUNRISE?

At my location the sun sets at 18:01 (6:01 PM)
So 1:00 ( 1:00AM) is before sunset.

The sun rises at 7:49. So 23:00 (11:00PM) is after sunrise.

To proof my point I build this testflow and ran it at 22:45

It turns out I was wrong.