216
Syntax
clock protocol { none | ntp }
undo clock protocol
Default
The device obtains its time through NTP.
Views
System view
Predefined user roles
network-admin
Parameters
none: Uses the system time set by using the clock datetime command.
ntp: Uses NTP to obtain the UTC time. You must configure NTP correctly. For more information
about NTP and NTP configuration, see Network Management and Monitoring Configuration Guide.
Usage guidelines
Correct system time is essential to network management and communication. You must configure
the system time correctly before you run the device on the network.
The device can use the locally set system time, or obtain the UTC time from an NTP source and
calculate the system time.
• If you configure the clock protocol none command, the device uses the locally set system
time. The device then uses the clock signals generated by its built-in crystal oscillator to
maintain the system time.
• If you configure the clock protocol ntp command, the device obtains the UTC time through
NTP and calculates the system time. The device then periodically synchronizes the UTC time
and recalculates the system time.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Configure the device to use the local UTC time.
<Sysname> system-view
[Sysname] clock protocol none
clock summer-time
Use clock summer-time to set the daylight saving time.
Use undo clock summer-time to restore the default.
Syntax
clock summer-time name start-time start-date end-time end-date add-time
undo clock summer-time
Default
The daylight saving time is not set.
Views
System view