Page 1 of 1

ESP32 SNTP Query always "Thu Jan 01 00:00:00 1970"

Posted: Mon Jan 31, 2022 11:14 am
by jpinheiro
As the title mentions, always getting "Thu Jan 01 00:00:00 1970" from AT+CIPSNTPTIME? query, after setting the timezone AT+CIPSNTPCFG=1,0,"us.pool.ntp.org","time.google.com"

Is there a specified wait time that is required before querying the SNTP time? The ESP32 is also connected to an AP prior to configuring the timezone.

Re: ESP32 SNTP Query always "Thu Jan 01 00:00:00 1970"

Posted: Mon Feb 07, 2022 2:35 am
by ESP_Sun
Yes, you need to wait to query the SNTP time, but how long to wait depends on the network and the SNTP server you set up, you can keep querying the SNTP time until you get the SNTP time.

Re: ESP32 SNTP Query always "Thu Jan 01 00:00:00 1970"

Posted: Mon Feb 07, 2022 2:39 am
by ESP_Sun
If you have set up the SNTP server once, and you cannot get the SNTP time by inquiring all the time, you can reset the SNTP server.