Some projects require date and time data, e.g. data logging applications. As long as you stay within your Wi-Fi coverage, there are no problems with this task. But how do you solve the problem without Wi-Fi or other network coverage ? The article explains alternative methods and shows a way to test the time accuracy of your ESP32 board.
This is the accompanying repository for my article "Several methods for Provisioning of Date & Time data to an ESP32 device" available here: https://medium.com/@androidcrypto/several-methods-for-provisioning-of-date-time-data-to-an-esp32-device-9f7f866a867d
There are several sketches in this repository:
Shows the usual way of date and time provisioning: log-in to your internet connection and get the date and time from an NTP Time Server. As the provided time is "UTC" ("Universal Coodinated Tinme") a timezone is necessary to get the local time.
This sketch is using the TFT_eSPI graphics library.
Access Point credentials:
SSID: Wi-Fi Provisioning
Password: 12345678
Provisioner address: 192.168.4.1
The ESP32 spans up a Wi-Fi Access Point and provides a simple form to enter the date and time data.
This sketch is using the TFT_eSPI graphics library.
Access Point credentials:
SSID: ESP32 Clock
Password: 12345678
Web form address: 192.168.4.1
The ESP32 is setting up a Bluetooth Low Energy Gatt Server (BLE Gatt Server) that can get accessed by Web BLE form. Alternativly you can connect by a BLE terminal app like "nRF Connect" with the Gatt Server and enter the date and time credentials in the Timestamp characteristic: 05/10/2025/16/40/24
This sketch is using the TFT_eSPI graphics library.
Web BLE credentials:
URL: https://androidcrypto.github.io/WebBle1/iwc03.html
BLE Gatt Server name: ESP32_Clock
Password: no password for connecting
SERVICE_UUID: 19b10000-e8f2-537e-4f6c-d104768a1214
Timestamp Characteristic UUID: 19b10003-e8f2-537e-4f6c-d104768a1214
Timestamp example: 05/10/2025/16/40/24
A GPS Module is connected to the ESP32 that receives the current coordinate of the device. During this process a very accurate date and time source is available.
This sketch is using the TFT_eSPI graphics library.
This sketch is using the LovyanGFX graphics library.
This sketch is using the LovyanGFX graphics library.
Arduino IDE Version 2.3.6 (Windows)
arduino-esp32 boards Version 3.2.0 (https://github.com/espressif/arduino-esp32)






