# Sunset and Sunrise times not correct

**URL:** <https://wled.discourse.group/t/sunset-and-sunrise-times-not-correct/3089>\
**Category:** Questions\
**Created:** [June 23, 2021, 6:20pm UTC](https://wled.discourse.group/t/sunset-and-sunrise-times-not-correct/3089 "2021-06-23T18:20:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinst38](https://avatars.discourse-cdn.com/v4/letter/k/e56c9b/32.png) [@kevinst38](https://wled.discourse.group/u/kevinst38)\
**Post date:** [June 23, 2021, 6:20pm UTC](https://wled.discourse.group/t/sunset-and-sunrise-times-not-correct/3089/1 "2021-06-23T18:20:09Z")

</div>

Hello,

Been playing with WLED version 0.12.1-b1 build 2104220 on a ESP32 for a couple months… finally have LEDs mounted to my deck and would like to utilize the time/macro based on the sunset time… When I enter input my Lat/Long in the Time setup screen I get some really wrong sunrise/sunset times… I’m using NTP, US-CST/CDT time zone, 0 UTC offset, Current local time is spot on. I use LAT of 44.94 and LONG of -94.28 as I’m in Minnesota, USA.

I notice the input screen show Long (E) but I’m in West and thought the -94 would signify W… am I missing something obvious or is the feature not 100% working?

Thanks,

Kevin

---

<div class="post-metadata">

**Author:** ![kevinst38](https://avatars.discourse-cdn.com/v4/letter/k/e56c9b/32.png) [@kevinst38](https://wled.discourse.group/u/kevinst38)\
**Post date:** [June 23, 2021, 6:56pm UTC](https://wled.discourse.group/t/sunset-and-sunrise-times-not-correct/3089/2 "2021-06-23T18:56:42Z")

</div>

Found the answer from Aircoookie in the GitHub issues list…

Hi!  
Yes, this is a bug that emerged because a math approximation had an input that was out of its range.  
Fixed in master 🙂 You can compile it yourself or wait for a 0.12.1-b2 binary, I will hopefully release that in the next few days!
