Error when using date_time on wifi

Hi,

Added date_time to STA by referring to lwm2m_client.

NCS 2.3.0

nRF7002-DK

An error occurred as shown below.

Fullscreen
1
2
3
4
5
6
7
[00:00:17.036,376] <wrn> date_time: ntp.uio.no getaddrinfo, error: -2
[00:00:17.036,407] <wrn> date_time: time.google.com getaddrinfo, error: -2
[00:00:17.036,437] <wrn> date_time: Did not get time from any NTP server
[00:00:17.036,437] <inf> sta: Could not obtain date-time update
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

It seems that getaddrinfo is not working properly.
remove getaddrinfo function code,
Entering the IP address manually in sntp_init works fine.

Is there a bug in getaddrinfo or do I need additional settings?

I am attaching the tested code.
You need to change ssid and password.

sta_date_time.zip

Thank you.