Setting the System Clock Manually
Before you set the system clock, obtain the following information about your time zone:
- The name of the time zone
- The difference (offset) between the time zone and UTC
- The dates and times of transitions to and from summer time (daylight saving time)
- The difference between the standard time and summer time (daylight saving time)
The international website www.timeanddate.com contains information about time zones.
![]() | Note: Be sure to set the time zone (default is UTC) and summer time dates before you set the clock. |
You can set the system clock at any time. This process involves the following steps:
- Set the time zone.
- Set the summer time dates.
- Set the time.
- Check the clock settings.
clock set
- Use to set the time and date on your system manually.
- Use the following syntax for setting the time: HH:MM:SS. This is the current time in 24-hour format—hours:minutes:seconds.
- There are two acceptable date forms for this command.
Both produce the same display when you run the show clock command.
- Day:month:year
- Month:day:year
- Exampleshost1#clock set 08:12:42 12 March 2000 host1#clock set 11:12:55 March 10 2000
- There is no no version.
- See clock set.
clock summer-time date
- Use to set the clock to switch automatically to summer time (daylight saving time).
- Examplehost1(config)#clock summer-time PDT date 1 April 200X 2:00
31 October 200X 2:00 60 - Use the no version to prevent automatic switching to summer time.
- See clock summer-time date.
clock summer-time recurring
- Use to set the clock to summer time at the same time each year.
- Example—This overrides the default settings for
PDT,host1(config)#clock summer-time PDT recurring first Sunday April 2:00 last Sunday October 2:00
- Use the no version to prevent automatic switching to summer time.
- See clock summer-time recurring.
clock timezone
- Use to set the time zone for display.
- Example—This sets the time zone to 5 hours behind
UTC.host1(config)#clock timezone EST -5
- Use the no version to set the time zone to UTC, the default setting.
- See clock timezone.
show calendar
- Use to display the real-time clock hardware time and date.
- Appropriate error messages are displayed for a real-time clock that is malfunctioning. Setting the software clock using the clock set command also causes the hardware or real-time clock chip to be updated to the same time as the software system clock.
- Example 1—Shows the real-time clock hardware time
and date when the real-time clock chip is working correctly
host1#show calendar MON JUN 06 2011 14:55:09 UTC
- Example 2—Shows the state of the real-time clock
battery when it has encountered a failure
host1#show calendar "RTC battery failed!"
- See show calendar.
show clock
- Use to display the system time and the date.
- Example 1—Shows time source value when clock is
manually configured
host1#show clock detail TUE JAN 23 2007 11:50:47 UTC time source: manually entered by user timezone: UTC (0 minutes from UTC)
- Example 2—Shows time source value when clock is
synchronized with NTP
host1#show clock detail TUE JAN 23 2007 11:50:47 UTC time source: Configured via NTP timezone: UTC (0 minutes from UTC)
- See show clock.
Hide Navigation Pane
Show Navigation Pane
SHA1
