You can use a library called ESP32time.
I have some ESP32's on a non-internet WiFi. The ESP32's receive time info from a MQTT Broker. ESP32time is used to set and get ESP time. Answer from Idahowalker on forum.arduino.cc
ESP32.io
esp32io.com › tutorials › esp32-rtc
ESP32 - RTC | ESP32 Tutorial
Select the right ESP32 board (e.g. ESP32 Dev Module) and COM port. Open the Library Manager by clicking on the Library Manager icon on the left navigation bar of Arduino IDE · Search “RTClib”, then find the RTC library by Adafruit
Phipps Electronics
phippselectronics.com › home › blog › working with the esp32 internal rtc
Working with the ESP32 Internal RTC - Phipps Electronics
April 9, 2026 - Fortunately, there is an easy-to-use library to code for the ESP32 RTC in Arduino. This library is called ESP32Time. After selecting your ESP32 board in Tools -> Board, go to the Library Manager and search for this library. Make sure to install it. After this, you can open an example code.
Videos
03:50
How to Read the ESP32 Internal Real-Time Clock (RTC) - Arduino ...
08:56
ESP32 Internal RTC | Real-Time Clock with NTP Server | Hidden ...
07:36
Set and retrieve internal RTC time on ESP32 boards. - YouTube
05:37
17 Time with RTC(DS3231) by using ESP32 Arduino - YouTube
06:39
Getting Started | Real-Time Clock vs. NTP Tracking Time w/ Arduino ...
03:04
Deep sleep: Use RTC memory to store data (ESP32 + Arduino series) ...
GitHub
github.com › Saad-Imtiaz › ESP32-Internal-RTC
GitHub - Saad-Imtiaz/ESP32-Internal-RTC: This code uses the internal RTC of ESP32 instead of an external RTC. · GitHub
This is an ESP32 sketch that connects to a WiFi network and retrieves the current time from an NTP (Network Time Protocol) server. The time is then set on the ESP32's real-time clock (RTC).
Author Saad-Imtiaz
GitHub
github.com › fbiego › ESP32Time
GitHub - fbiego/ESP32Time: An Arduino library for setting and retrieving internal RTC time on ESP32 boards · GitHub
Starred by 264 users
Forked by 46 users
Languages C++
GitHub
github.com › espressif › arduino-esp32 › issues › 3641
How to make use of ESP32 internal RTC to setup Epoch time? · Issue #3641 · espressif/arduino-esp32
January 16, 2020 - As mentioned in the datasheet of ESP32, I was trying to make use of the internal RTC. But not able to find any example or APIs related to it. Is there any way to access the RTC?
Author espressif
ESP32 Forum
esp32.com › viewtopic.php
ESP32 Internal RTC - ESP32 Forum
February 17, 2021 - You can find the low level RTC functions in the "rtc.h" library file; on my system it is located at \Arduino\hardware\espressif\esp32\tools\sdk\include\soc\soc\rtc.h Don't get confused with the other rtc.h that is located at \Arduino\hardware\espressif\esp32\tools\sdk\include\esp32\rom\rtc.h ... Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications.
Arduino Libraries
arduinolibraries.info › libraries › esp32-time
ESP32Time - Arduino Libraries
March 17, 2024 - Set and retrieve internal RTC time on ESP32 boards.
Arduino
docs.arduino.cc › libraries › esp32time
ESP32Time | Arduino Documentation
October 2, 2024 - Set and retrieve internal RTC time on ESP32 boards.
SunFounder
docs.sunfounder.com › projects › umsk › en › latest › 03_esp32 › esp32_lesson16_ds1302.html
Lesson 16: Real Time Clock Module (DS1302) — SunFounder Universal Maker Sensor Kit documentation
In this lesson, you will learn how to set up and use a Real Time Clock (RTC) module with an ESP32 development board. We’ll cover integrating the DS1302 RTC module, understanding its functions, and programming the ESP32 to display the current date and time. You’ll also learn how to handle ...
RNT Lab
rntlab.com › question › rtc-on-esp32
RTC on ESP32
It seems RTC_DATA_ATTR uint8_t newLinesCnt = 0; newLinesCnt value will survive through out light_sleep but not deep sleep. I did it. For text it is a bit more complex. See the docs. 1 Vote Up Vote Down · Ron Brinkman answered 5 years ago · In the project https://randomnerdtutorials.com/e...