Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started.

New Member

how to set clock on switch? (hardware calendar)

hi mates :)

anybody knows if I can set the clock based on hardware calendar? Please see how I tried and failed:

switch#show clock detail

*05:00:29.823 UTC Sat Jun 17 2006

Time source is hardware calendar.

unfortunately the time switch shows is wrong (One hour faster). I tried to fix it with the command:

switch#clock set 04:00:00 17 Jun 2006

switch#copy running-config startup-config

switch#show clock

04:01:01.507 UTC Sat Jun 17 2006

Time source is user configuration.

it worked until I re-started the switch. After the re-start, it showed the wrong time again (One hour faster again).

Is there any way to fix it and get the correct time even after re-start th switch?

thanks for help :)

  • Other Network Infrastructure Subjects

Re: how to set clock on switch? (hardware calendar)

The quick answer is no , it will always be wrong after unless you use a ntp server .

Re: how to set clock on switch? (hardware calendar)

Are you looking for this:

Setting the Software Clock from the Hardware Clock

Anyway , as the last post the best is to configure a NTP


if it does please rate this post.



Re: how to set clock on switch? (hardware calendar)

I will agree that the best way to set the clock is via NTP. However, it is desireable and possible to update the hardware clock (when there is one). If there is a network failure, and your router or switch reboots, you will still want your time rightly set.

Use the command

clock update-calendar

to set the hardware clock from the software clock.


Use the command

ntp update-calendar

to periodically update the hardware clock from ntp


Use the command

calendar set

to manually set the hardware clock


Note that not all Cisco routers and switches have hardware clock that keeps time.