# Linear clock does not show all LEDs when starting (WS2811)

**URL:** <https://forum.arduino.cc/t/linear-clock-does-not-show-all-leds-when-starting-ws2811/1277873>\
**Category:** General Guidance\
**Created:** [July 3, 2024, 9:39am UTC](https://forum.arduino.cc/t/linear-clock-does-not-show-all-leds-when-starting-ws2811/1277873 "2024-07-03T09:39:30Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [July 3, 2024, 9:18pm UTC](https://forum.arduino.cc/t/linear-clock-does-not-show-all-leds-when-starting-ws2811/1277873/24 "2024-07-03T21:18:43Z")

</div>

> [@PaulRB](#):
>
> The ESP32 Arduino Core has a software RTC built in, you don't need to use other libraries

+1  
NTP is built into the new ESP core.  
The libraries for the NTP code can be removed and the code reduced to a few lines.  
This is basically all you need.

```arduino
#include <WiFi.h> // ESP32
time_t now; // epoch
tm tm; // time struct

void setup() {
  configTzTime("CET-1CEST,M3.5.0,M10.5.0/3", "de.pool.ntp.org"); // https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv
}

void loop() {
  time(&now); // epoch
  localtime_r(&now, &tm); // local offset
}

```

No NTPClient, no timeClient, no WiFiUDP etc.  
The structure elements `tm.tm_hour, tm.tm_min, tm,tm_sec` now contain the time.  
Leo..

---

_[View the full topic](https://forum.arduino.cc/t/linear-clock-does-not-show-all-leds-when-starting-ws2811/1277873)._
