The Clock Set [Hh:Mm:Ss] [Month Day Year] Cisco command

Command: clock set [hh:mm:ss] [month day year]

Function: Sets the system time on a Cisco device.

Parameters:

Usage:

The clock set command can be used to set the system time on a Cisco device. The command is entered in the following format:

clock set [hh:mm:ss] [month day year]

For example, to set the system time to 12:34:56 on January 1, 2023, you would enter the following command:

clock set 12:34:56 01 01 2023

Compatibility:

The clock set command is supported on all Cisco devices that run the IOS operating system.

Example:

The following example shows how to use the clock set command to set the system time on a Cisco router:

Router> enable
Router# configure terminal
Router(config)# clock set 12:34:56 01 01 2023
Router(config)# end
Router#

Additional Information:

clock set [hh:mm:ss] [month day year] Usage Examples

Example 1: Setting the system time to 1:30 PM on January 15, 2023.

clock set 13:30:00 Jan 15 2023

Example 2: Setting the system time to 8:00 AM on March 8, 2024.

clock set 08:00:00 Mar 8 2024

Example 3: Setting the system time to 11:45 PM on December 31, 2025.

clock set 23:45:00 Dec 31 2025

Example 4: Setting the system time to 10:00 AM on February 29, 2028, a leap year.

clock set 10:00:00 Feb 29 2028