How to set the time on routers or switches

Either on a switch or a router use clock set HH:MM:SS day MON YEAR:

Device#clock set 14:20:00 12 JUN 2014

To view the time use show clock:

Device#show clock
14:22:43.531 UTC Thu Jun 12 2014

If you want to be sure that the time is approximatively exact use a syslog server (tftpd 32) to check it. I have ~2 seconds difference between the router’s time and a computer’s time.

Sys Log Time

Sys Log Time

here you will see it much clearer:

SysLog Time 02

SysLog Time 02

Using CCP (Cisco Configuration Professional) I have used the PC to synchronize the time on the deive.
These are the commands:

clock timezone PCTime 2 0
clock summer-time PCTime date Mar 30 2003 3:00 Oct 26 2003 4:00

On reload it will synchronize with the PCTime, which has the summer hours:

  • on march, 30th 2003 it is 3am, and
  • on octomber, 26th 2003 it is 4am.

Verify:

R2#show clock
*21:11:57.991 PCTime Sun Nov 23 2014

Leave a Reply

Your email address will not be published. Required fields are marked *


3 + four =