I am using the ESP8266_RTOS_SDK_v2.x.x with my ESP8266. I need to connect to my Cloud (using Google Cloud Platform) and to do this, I generate a JWT. For that, I need the Unix time so I can set the validity of the token I am creating.
So, I am trying to use the API
Code: Select all
ret_bool = configTime(1, 1, "pool.ntp.org", NULL, NULL, true);
ESP_LOG_INFO("ret_bool after: %d", ret_bool);
time_t now = time(NULL);
The problem is that, even though ret_bool is returning 1 (everything went well calling
everytime.please start sntp first !
I can't figure out what is going wrong, as I am using the time.h API provided in the ESP8266_RTOS_SDK_v2.x.x
Does anyone have an idea of what I could be doing wrong?
PS: I do establish a WiFI internet connection prior to calling