# Time without internet access

**URL:** <https://wled.discourse.group/t/time-without-internet-access/5951>\
**Category:** Questions\
**Created:** [September 15, 2022, 12:21pm UTC](https://wled.discourse.group/t/time-without-internet-access/5951 "2022-09-15T12:21:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![valerossi46](https://avatars.discourse-cdn.com/v4/letter/v/f14d63/32.png) [@valerossi46](https://wled.discourse.group/u/valerossi46)\
**Post date:** [September 15, 2022, 12:21pm UTC](https://wled.discourse.group/t/time-without-internet-access/5951/1 "2022-09-15T12:21:39Z")

</div>

Hi,

I made a 3d printed led signboard, with WLED. I used a wemos D1 mini controller.  
I use automatic turn on/off with macros and it works well if a NTP server is available. But no wifi is accessible where the signboard is, so every time power is disconnected, time is resetted to 1970.

I add a RTC module with battery (DS 3231) connected to SDA and SCL pins of the card. But it’s doesn’t seems to works with Wled. Time is lost when power is disconnected.

Does someone succesfully use this kind of module with WLED? Does when the NTP server is accessible time is setted on the serial I2C port?

Thanks for your help !

---

<div class="post-metadata">

**Author:** ![divsys](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@divsys](https://wled.discourse.group/u/divsys)\
**Post date:** [September 15, 2022, 12:56pm UTC](https://wled.discourse.group/t/time-without-internet-access/5951/2 "2022-09-15T12:56:57Z")

</div>

There’s a usermod (“RTC”) that looks like it covers that.

---

<div class="post-metadata">

**Author:** ![valerossi46](https://avatars.discourse-cdn.com/v4/letter/v/f14d63/32.png) [@valerossi46](https://wled.discourse.group/u/valerossi46)\
**Post date:** [September 15, 2022, 1:44pm UTC](https://wled.discourse.group/t/time-without-internet-access/5951/3 "2022-09-15T13:44:40Z")

</div>

Thanks, i will check how to use this!

---

<div class="post-metadata">

**Author:** ![espuno](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/espuno/32/4189_2.png) [@espuno](https://wled.discourse.group/u/espuno)\
**Post date:** [January 2, 2023, 10:18pm UTC](https://wled.discourse.group/t/time-without-internet-access/5951/4 "2023-01-02T22:18:12Z")

</div>

did you find a solution?

---

<div class="post-metadata">

**Author:** ![valerossi46](https://avatars.discourse-cdn.com/v4/letter/v/f14d63/32.png) [@valerossi46](https://wled.discourse.group/u/valerossi46)\
**Post date:** [January 3, 2023, 3:48pm UTC](https://wled.discourse.group/t/time-without-internet-access/5951/5 "2023-01-03T15:48:13Z")

</div>

Yes, I compiled with the RTC usermod and it works.

---

<div class="post-metadata">

**Author:** ![abdulkhan79](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/abdulkhan79/32/4929_2.png) [@abdulkhan79](https://wled.discourse.group/u/abdulkhan79)\
**Post date:** [April 20, 2023, 6:39am UTC](https://wled.discourse.group/t/time-without-internet-access/5951/6 "2023-04-20T06:39:45Z")

</div>

Hi,

How did you compile? I am using WLED beta release 0.14.0-b1

Followed below steps, compiled without errors but for some reason I dont see RTC in user mod.

1. copied usermod\_rtc.h to WLED-main folder where platformio.ini is residing
2. added -D USERMOD\_RTC under build\_flags in platformio.ini

_build\_flags =_

- -DMQTT\_MAX\_PACKET\_SIZE=1024\*
- -DSECURE\_CLIENT=SECURE\_CLIENT\_BEARSSL\*
- -DBEARSSL\_SSL\_BASIC\*
- -D CORE\_DEBUG\_LEVEL=0\*
- -D NDEBUG\*
- #build\_flags for the IRremoteESP8266 library (enabled decoders have to appear here)\*
- -D _IR\_ENABLE\_DEFAULT_=false\*
- -D DECODE\_HASH=true\*
- -D DECODE\_NEC=true\*
- -D DECODE\_SONY=true\*
- -D DECODE\_SAMSUNG=true\*
- -D DECODE\_LG=true\*
- ; -Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library\*
- -DWLED\_USE\_MY\_CONFIG\*
- ; -D USERMOD\_SENSORSTOMQTT\*
- #For ADS1115 sensor uncomment following\*
- ; -D USERMOD\_ADS1115\*
- -D USERMOD\_RTC\*

1. compiled and uploaded

---

<div class="post-metadata">

**Author:** ![stretchy](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@stretchy](https://wled.discourse.group/u/stretchy)\
**Post date:** [August 23, 2023, 3:48pm UTC](https://wled.discourse.group/t/time-without-internet-access/5951/7 "2023-08-23T15:48:42Z")

</div>

I am trying to compile with the RTC module, using version .14B4, and the module it not being included in the build. Other modules (such as audio) are not being included as. Could someone recommend the best way to do this? I followed the directions on the wled knowledge page, but still doesn’t work.

---

<div class="post-metadata">

**Author:** ![Bauke](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Bauke](https://wled.discourse.group/u/Bauke)\
**Post date:** [November 9, 2023, 11:58am UTC](https://wled.discourse.group/t/time-without-internet-access/5951/8 "2023-11-09T11:58:44Z")

</div>

Hi there,

Hello, I solved it by enabling a hotspot on my phone. login name and password same as the Wled(esp32) settings. The time is then taken from the internet via my phone. After that, time continues to run in the ESP32 without internet.

---

<div class="post-metadata">

**Author:** ![techhamara](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/techhamara/32/6805_2.png) [@techhamara](https://wled.discourse.group/u/techhamara)\
**Post date:** [January 2, 2024, 5:54pm UTC](https://wled.discourse.group/t/time-without-internet-access/5951/9 "2024-01-02T17:54:47Z")

</div>

Hi can you share .bin file of Your compiled wled with include rtc Project.  
Or guide how can create rtc to wled.
