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

jpinheiro
Posts: 1
Joined: Wed Sep 18, 2019 2:58 pm

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

Postby jpinheiro » Mon Jan 31, 2022 11:14 am

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.

ESP_Sun
Posts: 326
Joined: Thu Dec 30, 2021 9:52 am

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

Postby ESP_Sun » Mon Feb 07, 2022 2:35 am

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.

ESP_Sun
Posts: 326
Joined: Thu Dec 30, 2021 9:52 am

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

Postby ESP_Sun » Mon Feb 07, 2022 2:39 am

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.

Who is online

Users browsing this forum: No registered users and 45 guests