-->
Page 1 of 1

What is the canonical way to set time in the pseudo-RTC

PostPosted: Thu Dec 26, 2019 8:29 am
by Jan Sz
Hey,

So I want to synchronise time via an MQTT message - what's the right system call for setting the current time in seconds? I've looked at the sntp_* functions, but it seems those aren't exposed to be used, and they are low level - there's a higher level interface which binds to a number of SNTP servers and proceeds to set time through there.

What if I want to set the time from another source? How would I go about that?

Re: What is the canonical way to set time in the pseudo-RTC

PostPosted: Thu Dec 26, 2019 6:10 pm
by davydnorris
The sntp_* functions are exposed. What OS and environment are you using?

Re: What is the canonical way to set time in the pseudo-RTC

PostPosted: Fri Dec 27, 2019 2:37 am
by Jan Sz
I'm using the Arduino port for ESP8266 - trying to use the updateTime() function from tools/sdk/lwip/include/lwip/app/time.h - how do you include this?