Sunset and Sunrise times not correct (v0.13.0-b2 "Toki")

Hello Community,

I’m using the Sunset and Sunrise function to contol the light with PIR.
Afer the light switch on on day time, I checked the time in WLED and it seams that the calculated time is wrong:
Sunrise: 13:05 Sunset: 01:11

My time settings are:
Get time from NTP server: 0.de.pool.ntp.org
Use 24h format: X
Time zone: CET/CEST
UTC offset: 0 seconds (max. 18 hours)

Current local time is 2021-9-24, 11:49:05.
Latitude (N): 52,46 Longitude (E): 9,89 ()
Location is in Germany: (Google Maps)

I compiled the version self to get the usermod2 PIR active.

May I missed something?

Greetings
Mia :blush:

A few of us have found this. :wink: In process.

1 Like

Actually, fixed in latest code.

Is this since v0.13.0-b3 was released? I just installed b3, and the sunrise/set calculations are still not correct.

Yes, fixed after b3 was released.
You can compile master if you need immediate fix.

@srg74 also has @blazoncek bins with the fix.

Had a similar thing and “fixed” it by setting the UTC offset. In my case, standard time is 5 hours from UTC, so put in 18,000 and the times snapped into place. I’d have thought it would default from the timezone, but guessing it either doesn’t or that may need to attention.

It does. There was a math error in the code.
No need to enter offset if you can find proper TZ.