• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ntpdate
2
3
4## Command Function<a name="section38494293815"></a>
5
6This command is used to synchronize system time from the server.
7
8## Syntax<a name="section5503114413387"></a>
9
10ntpdate \[_SERVER\_IP1_\] \[_SERVER\_IP2_\]...
11
12## Parameters<a name="section136934472383"></a>
13
14**Table  1**  Parameter description
15
16<a name="table2616mcpsimp"></a>
17<table><thead align="left"><tr id="row2622mcpsimp"><th class="cellrowborder" valign="top" width="20.79%" id="mcps1.2.4.1.1"><p id="p2624mcpsimp"><a name="p2624mcpsimp"></a><a name="p2624mcpsimp"></a><strong id="b156978804711722"><a name="b156978804711722"></a><a name="b156978804711722"></a>Parameter</strong></p>
18</th>
19<th class="cellrowborder" valign="top" width="52.480000000000004%" id="mcps1.2.4.1.2"><p id="p2626mcpsimp"><a name="p2626mcpsimp"></a><a name="p2626mcpsimp"></a><strong id="b53501572310"><a name="b53501572310"></a><a name="b53501572310"></a>Description</strong></p>
20</th>
21<th class="cellrowborder" valign="top" width="26.729999999999997%" id="mcps1.2.4.1.3"><p id="p2628mcpsimp"><a name="p2628mcpsimp"></a><a name="p2628mcpsimp"></a><strong id="b88462564511722"><a name="b88462564511722"></a><a name="b88462564511722"></a>Value Range</strong></p>
22</th>
23</tr>
24</thead>
25<tbody><tr id="row2629mcpsimp"><td class="cellrowborder" valign="top" width="20.79%" headers="mcps1.2.4.1.1 "><p id="p2631mcpsimp"><a name="p2631mcpsimp"></a><a name="p2631mcpsimp"></a>SERVER_IP</p>
26</td>
27<td class="cellrowborder" valign="top" width="52.480000000000004%" headers="mcps1.2.4.1.2 "><p id="p2633mcpsimp"><a name="p2633mcpsimp"></a><a name="p2633mcpsimp"></a>Specifies the IP address of the NTP server.</p>
28</td>
29<td class="cellrowborder" valign="top" width="26.729999999999997%" headers="mcps1.2.4.1.3 "><p id="entry2634mcpsimpp0"><a name="entry2634mcpsimpp0"></a><a name="entry2634mcpsimpp0"></a>N/A</p>
30</td>
31</tr>
32</tbody>
33</table>
34
35## Usage<a name="section121401651173816"></a>
36
37Run the  **ntpdate **\[_SERVER\_IP1_\] \[_SERVER\_IP2_\]... command.  **ntpdate**  obtains and displays the time of the first server with a valid IP address.
38
39## Example<a name="section3431554203811"></a>
40
41Run  **ntpdate 192.168.1.3 **to update the system time.
42
43## Output<a name="section18638194610115"></a>
44
45```
46OHOS # ntpdate 192.168.1.3
47time server 192.168.1.3: Mon Jun 13 09:24:25 2016
48```
49
50If the time zone of the board is different from that of the server, the displayed time may be several hours different from the obtained server time.
51
52