clock datetime
Use clock datetime to set the UTC time.
Syntax
clock datetime time date
Default
The factory default UTC time is used.
Views
User view
Predefined user roles
network-admin
mdc-admin
Parameters
time: Specifies a time in the hh:mm:ss format. The hh value is in the range of 0 to 23, the mm value is in the range of 0 to 59, and the ss value is in the range of 0 to 59. The leading zero in a segment can be omitted. If the seconds segment is 0 (hh:mm:00), you can omit it. If both the minutes and seconds segments are 0 (hh:00:00), you can omit both of the segments. For example, to specify 08:00:00, you can enter 8.
date: Specifies a date in the MM/DD/YYYY or YYYY/MM/DD format. The YYYY value is in the range of 2000 to 2035, the MM value is in the range of 1 to 12, and the value range for DD depends on the month value.
Usage guidelines
The UTC time, together with the local time zone and daylight saving time, determines the system 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.
Examples
# Set the UTC time to 08:08:08 01/01/2015.
<Sysname> clock datetime 8:8:8 1/1/2015
# Set the UTC time to 08:10:00 01/01/2015.
<Sysname> clock datetime 8:10 2015/1/1
Related commands
clock protocol
clock summer-time
clock timezone
display clock