harmony 鸿蒙ntpdate

  • 2022-08-09
  • 浏览 (779)

ntpdate

Command Function

This command is used to synchronize system time from the server.

Syntax

ntpdate [_SERVERIP1] [_SERVERIP2]…

Parameters

Table 1 Parameter description

Parameter Description Value Range
SERVER_IP Specifies the IP address of the NTP server. N/A

Usage Guidelines

Run the ntpdate [_SERVERIP1] [_SERVERIP2]… command to obtain and display the time of the first server with a valid IP address.

Example

Run **ntpdate 192.168.1.3 **to update the system time.

Output

OHOS # ntpdate 192.168.1.3
time server 192.168.1.3: Mon Jun 13 09:24:25 2016

If the time zone of the board is different from that of the server, the displayed time may be several hours different from the server time obtained.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Kernel

harmony 鸿蒙Kernel Coding Specification

harmony 鸿蒙Standard Libraries

harmony 鸿蒙Interrupt Management

harmony 鸿蒙Event

harmony 鸿蒙Mutex

harmony 鸿蒙Queue

harmony 鸿蒙Semaphore

harmony 鸿蒙Doubly Linked List

harmony 鸿蒙Memory Management

0  赞