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.
🌐
Theelectronics
theelectronics.co.in › home › esp32 › how to use internal rtc of esp32 without using ntp
How to use internal RTC of ESP32 without using NTP
January 22, 2023 - To use the internal RTC functionality of ESp32, You have to install ESP32Time Library for Arduino. You can do it by visiting Sketch >> Include Library >> Manage Libraries section.
🌐
Random Nerd Tutorials
randomnerdtutorials.com › home › project › esp32 › esp32: guide for ds3231 real time clock module (rtc) — getting time and setting alarms
ESP32: Guide for DS3231 Real Time Clock Module (RTC) | Random Nerd Tutorials
April 28, 2025 - The DS3231 RTC Module allows you to set up to two alarms: alarm 1 and alarm 2. When using the RTCLib Library, these are the accepted modes for the alarms: The following example shows how to set up two alarms and how to use them to trigger an ...
🌐
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
An Arduino library for setting and retrieving internal RTC time on ESP32 boards - fbiego/ESP32Time
Starred by 264 users
Forked by 46 users
Languages   C++
🌐
Random Nerd Tutorials
randomnerdtutorials.com › home › project › esp32 › esp32: guide for ds1307 real time clock (rtc) module (arduino ide)
ESP32: Guide for DS1307 Real Time Clock (RTC) - Arduino | Random Nerd Tutorials
March 24, 2025 - Search for RTClib and install the library by Adafruit. We’re using version 2.1.4. The following example sets the time on the RTC clock, and then reads the time in the loop every three seconds.
Find elsewhere
🌐
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.
🌐
ESP32 Learning
esp32learning.com › home › esp32 and ds3231 rtc example
ESP32 and DS3231 RTC example
December 30, 2023 - #include <Wire.h> #include "RTClib.h" RTC_DS3231 rtc; char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; void setup () { #ifndef ESP8266 while (!Serial); // for Leonardo/Micro/Zero #endif ...
🌐
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 ...
🌐
Blogger
techknowsurf.blogspot.com › home › internal rtc of esp32 › exploring the internal real-time clock (rtc) of the esp32 with arduino
Exploring the Internal Real-Time Clock (RTC) of the ESP32 with Arduino
January 9, 2023 - So ,we explored how to use the internal RTC of the ESP32 with the esp32time library in the Arduino environment. We covered the steps for setting up and configuring the library, as well as how to set and get the time from the RTC and schedule tasks to be executed at specific times.
🌐
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...
🌐
Maker Guides
makerguides.com › home › inputs & sensors › real-time-clock ds3231 with esp32
Real-Time-Clock DS3231 with ESP32
February 9, 2026 - First connect SCL of the DS3231 to pin 23 of the ESP32. Then connect SDA to pin 19 of the DS3231. Finally, connect ground to GND, and 3.3V to VCC as show below: ... Since we are running DS3231 RTC Module on 3.3V, you could have a CR2032 battery ...
🌐
IotCircuitHub
iotcircuithub.com › home › esp32 projects › esp32 internal rtc timer control relay
ESP32 Internal RTC Timer Control Relay - IotCircuitHub
March 29, 2024 - In this article, I explained all the steps to make this ESP32 RTC home automation system, and how to fetch data from the NTP server. In this ESP32 project, you can control the relay using ESP32 internal RTC, so you don’t need a Wi-Fi connection all the time.