How to Configure Date, Clock and Time zone on Cisco Router/Switch

Configuration of Date, Time and Time Zone on a Cisco Router or Switch is very useful sometimes because if you need to take the backup of your Router on regular basis and you want to configure the Schedule to take the backup automatically. It will sure ask you to set your clock first and then make the necessary for scheduled configuration backup. Also it is useful for other things like looking for exact time and date for log file viewing, configure Scheduled Reload on Cisco Router or Switch and making connections between two different time zones. Find below some important key points to configure Date, Clock and Time Zone.

  1. You can schedule a command to take the Configuration backup of your Router with exact date, time and time zone
  2. The Correct time will allow the Router to connect to two different times
  3. You can view the log file of your Router exactly and it is very useful for troubleshooting.
  4. You can also configure Scheduled Reload on Router.

You can set the clock on the Router with the privileged mode command: clock set <hh:mm:ss> <date> <MONTH> <year>. When issuing this command, you must use the actual name of the month, not its number.

You may also want to set the time zone and daylight savings time adjustments. This is done in global configuration mode. The commands are: clock timezone <NAME_OF_ZONEgt; <hoursoffset-from-GMT> and clock summer-time <name-of-timezone> recurring.


Configure/set the Date and Clock on Cisco Router:

First you need to enter the sh clock command to check what’s the time of the Router right now:

Cisco-Router#show clock

Display : 23:24:44.515 GMT Sat Jan 01 2000

To set the time on Cisco Router/Switch, use below command in enable mode (not configuration mode)

Cisco-Router#clock ?
  set  Set the time and date

Cisco-Router#clock set ?
  hh:mm:ss  Current Time

Cisco-Router#clock set 10:20:00 ?
  <1-31>  Day of the month
  MONTH   Month of the year

Cisco-Router#clock set 10:20:00 26?

Cisco-Router#clock set 10:20:00 26 ?
  MONTH  Month of the year

Cisco-Router#clock set 10:20:00 26 SEPT ?
  <1993-2035>  Year

Cisco-Router#clock set 10:20:00 26 SEPT 2010

Cisco-Router#sh clock
10:20:03.415 UTC Wed Sep 26 2010

Cisco-Router(config)#clock timezone GMT 7

Cisco-Router(config)#do sh clock
10:21:11.979 GMT Wed Sep 26 2010

Cisco-Router(config)#ntp clock-period 17179574

Cisco-Router(config)#ntp master

Cisco-Router(config)#do sh clock
10:31:30.675 GMT Wed Sep 26 2010

Configure/set the Time Zone on Cisco Router:

Go to the global configuration mode of the Router and then issue under given commands.

Cisco-Router(config)#clock timezone EST –5
Cisco-Router(config)#clock summer-time EDT recurring

The above commands will set the time, date and time zone of your Router. if you like to check the updated date, time and time zone of your Router use the “show clock” command.

Cisco-Router#show clock
16:02:18.331 EST Sat Sept 10 2004

Filed Under: Cisco General


About the Author:

RSSComments (1)

Leave a Reply | Trackback URL

  1. Gautham says:

    Hey there, You have performed an incredible job. I’ll definitely digg it and individually recommend to my friends. I’m sure they will be benefited from this web site.

Leave a Reply

If you want a picture to show with your comment, go get a Gravatar.