This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

CONFIG_NET_CONFIG_CLOCK_SNTP_INIT

Initialize system clock using SNTP on application startup

Type: bool

Help

Perform an SNTP request over networking to get and absolute
wall clock time, and initialize system time from it, so
functions like time(), gettimeofday(), etc. returned the
correct absolute time (no just time since system startup).
Requires networking.

Direct dependencies

SNTP && POSIX_CLOCK && NETWORKING

(Includes any dependencies from ifs and menus.)

Defaults

No defaults. Implicitly defaults to n.

Kconfig definition

At subsys/net/lib/config/Kconfig:190

Included via Kconfig:8Kconfig.zephyr:44subsys/Kconfig:39subsys/net/Kconfig:89subsys/net/lib/Kconfig:28

Menu path: (Top) → Sub Systems and OS Services → Networking → Link layer and IP networking support → Network Libraries

config NET_CONFIG_CLOCK_SNTP_INIT
    bool "Initialize system clock using SNTP on application startup"
    depends on SNTP && POSIX_CLOCK && NETWORKING
    help
      Perform an SNTP request over networking to get and absolute
      wall clock time, and initialize system time from it, so
      functions like time(), gettimeofday(), etc. returned the
      correct absolute time (no just time since system startup).
      Requires networking.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)