Jon Loeliger | b8a4968 | 2007-07-09 19:10:03 -0500 | [diff] [blame] | 1 | To use SNTP support, add define CONFIG_CMD_SNTP to the |
| 2 | configuration file of the board. |
wdenk | b4ad962 | 2005-04-01 00:25:43 +0000 | [diff] [blame] | 3 | |
| 4 | The "sntp" command gets network time from NTP time server and |
| 5 | syncronize RTC of the board. This command needs the command line |
| 6 | parameter of server's IP address or environment variable |
| 7 | "ntpserverip". The network time is sent as UTC. So if you want to |
| 8 | set local time to RTC, set the offset in second from UTC to the |
Thomas Weber | 6726631 | 2012-03-24 22:44:01 +0000 | [diff] [blame] | 9 | environment variable "time offset". |
wdenk | b4ad962 | 2005-04-01 00:25:43 +0000 | [diff] [blame] | 10 | |
| 11 | If the DHCP server provides time server's IP or time offset, you |
| 12 | don't need to set the above environment variables yourself. |
| 13 | |
| 14 | Current limitations of SNTP support: |
| 15 | 1. The roundtrip time is ignored. |
| 16 | 2. Only the 1st NTP server IP, in the option ntp-servers of DHCP, will |
| 17 | be used. |