Configuring the System Clock

Overview for System Clock

The system clock can be implemented in two ways. One is to automatically synchronize the time from the Simple Network Time Protocol (SNTP) server as the SNTP client, and the other can be configured by the administrator.

The system clock is divided into hardware clock and software clock. After configuring the system time manually, restart the device. If the default time is restored after restarting, it means that the hardware clock is not supported and only the software clock is supported.

Configuring the System Clock

SUMMARY STEPS

  1. enable
  2. clock set HH:MM:SS YYYY/MM/DD
  3. configure terminal
  4. clock timezone zone-name hours- offset minutes-offset
  5. clock summer-time {dayly | weekly}
  6. show clock

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:

Device> enable 

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

clock set HH:MM:SS YYYY/MM/DD

Example:

Device# clock set 10:03:33 

Configures the system clock.

Step 3

configure terminal

Example:

Device# configure terminal 

(Optional) Enters global configuration mode.

Step 4

clock timezone zone-name hours- offset minutes-offset

Example:

Device(config)# configure terminal 

(Optional) Configures the system time zone.

Step 5

clock summer-time {dayly | weekly}

Example:

Device(config)# clock summer-time dayly 00:00:00 2021/03/12 00:00:00 2021/11/0
5 

(Optional) Configures summer time.

Step 6

show clock

Example:

Device(config)# show clock 

(Optional) Displays information about the system clock.

Example: Configuring the System Clock

The following example shows how to configure the system clock:

Device> enable
Device# clock set 17:50:50 2015/11/25

Set clock successfully.                                                         
Clock will be reset to 2013/01/01 00:00:00 after system rebooting because there 
is no realtime clock chip.