Build error when using date_time.h lib

Hi,

I want to use a timestamp in my payload when ever I send data to the cloud.

First I wanted to use the ntp example from HÃ¥kon found here: https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/ntp

But as suggested in another thread here in devzone I went with the date_time lib: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/date_time.html

In prj.conf I added:

CONFIG_DATE_TIME=y
CONFIG_DATE_TIME_UPDATE_INTERVAL_SECONDS=10

In kconfig I added:

config DATE_TIME_UPDATE_INTERVAL_SECONDS
    int "Date time update interval, in seconds"
    default 3600
	
menuconfig DATE_TIME
    bool "Date time library"
    select AT_CMD
    select SNTP
    depends on BSD_LIBRARY

In main.c I added:

//on top
#include <date_time.h>

//in main() after I etablished my lte connection:
date_time_update();

This is my build error:

What am I missing?

Also, the date_time lib is missing if using the toolchain manager to download and install the ncs version 1.3.0.

Now I'm using master branch.

Best,

Tim

Related