clock set
To change the software clock settings, use the clock set command in XR EXEC mode.
clock set hh:mm:ss {day month | month day} year
Syntax Description
hh: mm: ss |
Current time in hours (24-hour format), minutes, and seconds. Colons are required between values. |
day |
Current day (by date) in the month. |
month |
Current month (by name). |
year |
Current year (no abbreviation). Enter a valid four-digit year. |
Command Default
Clock is not set.
Command Modes
XR EXEC mode
Command History
Release | Modification |
---|---|
Release 7.0.12 |
This command was introduced. |
Usage Guidelines
Generally, if the system is synchronized by a valid outside timing mechanism, such as a Network Time Protocol (NTP) clock source, or if you have a networking device with calendar capability, you need not set the software clock. Use the clock set command if no other time sources are available. The time specified in this command is relative to the configured time zone.
Examples
Setting the Software Clock
This example shows how to set the software clock using the clock set command with the day month arguments first.
RP/0/RP0/CPU0:router# clock set 14:12:00 10 feb 2005
14:12:00.114 JST Fri Feb 10 2009
This example shows how to set the software clock using the clock set command with the month day arguments first.
RP/0/RP0/CPU0:router# clock set 14:38:00 feb 10 2005
14:38:00.069 PST Tue Feb 10 2009
Examples
This example shows how to display the settings of the software clock:
RP/0/RP0/CPU0:router# show clock
14:38:11.292 PST Tue Feb 10 2009