xref: /openbmc/u-boot/doc/README.SNTP (revision 7373323056f524b3136cee4911f1debc23723ae7)
1b5501f7dSJon LoeligerTo use SNTP support, add define CONFIG_CMD_SNTP to the
2b5501f7dSJon Loeligerconfiguration file of the board.
3ea287debSwdenk
4ea287debSwdenkThe "sntp" command gets network time from NTP time server and
5ea287debSwdenksyncronize RTC of the board. This command needs the command line
6ea287debSwdenkparameter of server's IP address or environment variable
7ea287debSwdenk"ntpserverip". The network time is sent as UTC. So if you want to
8ea287debSwdenkset local time to RTC, set the offset in second from UTC to the
9*c46bf09eSThomas Weberenvironment variable "time offset".
10ea287debSwdenk
11ea287debSwdenkIf the DHCP server provides time server's IP or time offset, you
12ea287debSwdenkdon't need to set the above environment variables yourself.
13ea287debSwdenk
14ea287debSwdenkCurrent limitations of SNTP support:
15ea287debSwdenk1. The roundtrip time is ignored.
16ea287debSwdenk2. Only the 1st NTP server IP, in the option ntp-servers of DHCP, will
17ea287debSwdenk   be used.
18