139
Configuring the system time
Specifying the system time source
The device can use one of the following system time sources:
• None—Local system time, which is manually configured at the CLI.
• PTP—PTP time source. When the device uses the PTP time source, you cannot change the system
time manually. For more information about PTP, see Network Management and Monitoring
Configuration Guide.
• NTP—NTP time source. When the device uses the NTP time source, you cannot change the system
time manually. For more information about NTP, see Network Management and Monitoring
Configuration Guide.
If you configure the clock protocol none command together with the clock protocol ntp or clock protocol
ptp command, the device uses the NTP or PTP time source.
If you power cycle an 5920, the system time settings are restored to the defaults. You must configure the
settings again.
Power cycling or using the reboot command to reboot an 5920AF does not change the system time
settings.
To specify the system time source:
Ste
Command
Remarks
1. Enter system view.
system-view N/A
2. Specify the system time
source.
clock protocol { none | ntp | ptp }
By default, the device uses the NTP
time source.
If you configure this command
multiple times, the most recent
configuration takes effect.
Setting the system time
When the system time source is the local system time, the system time is determined by the UTC time, local
time zone, and daylight saving time. You can use the display clock command to view the system time.
A correct system time setting is essential to network management and communication. Set the system time
correctly or use NTP to synchronize your device with a trusted time source before you run it on the
network.
To set the system time:
Ste
Command
Remarks
1. Set the UTC time.
clock datetime time date
By default, the UTC time is the
factory-default time.
2. Enter system view.
system-view N/A
3. Set the local time zone.
clock timezone zone-name { add |
minus } zone-offset
The default local time zone is the
UTC time zone.