How can I set the date / time?
Posted: Sun Jun 10, 2018 5:42 pm
I an moving some code from an ESP8266 to an ESP32.
I am using the Arduino IDE
I wish to set an arbitrary date and time
In the ESP8266 code I can use a library function called setTime(). However this doesn't exist in the ESP32 version of the libraries.
There is an example in the Expressif code that uses the Unix-y settimeofday(&tv, &tz) function. However this example requires a header file called coredecls.h that does not appear on the code base I installed with the ESP32 Arduino environment.
What do you do to set the time without using NTP?
with thanks!
I am using the Arduino IDE
I wish to set an arbitrary date and time
In the ESP8266 code I can use a library function called setTime(). However this doesn't exist in the ESP32 version of the libraries.
There is an example in the Expressif code that uses the Unix-y settimeofday(&tv, &tz) function. However this example requires a header file called coredecls.h that does not appear on the code base I installed with the ESP32 Arduino environment.
What do you do to set the time without using NTP?
with thanks!