I have an ESP32 running on batteries with display.
So, initially, esp32 connects to the WiFi, fetches time from ntp server, turns off WiFi, shows time on the display and then sleep after 30 sec.
The issue is - The esp32 is later woken up by an external button, and I want it to display time, without connecting to the internet. To do this I either need to store time or if its implemented in the time library?
I don't know if I need to store time (if that's what is required) and later display it without connecting to the internet, or use the now() function of time library to fetch the time after waking up and show it on the screen?
After every hour or so, as per requirements, I do again connect to the internet to transfer data, but I don't want to connect to the internet every time I have to show just the time upon waking up, plus it take few seconds to connect and fetch time, so I was wondering if there is any way to store and fetch time locally, syncing the local clocks every few hours.
Thoughts or pointers please.