Cisco router’s clock and Time Zone

Posted: April 20, 2012 in Cisco IOS
Tags: , ,

If a Cisco router boots up before you’ve configured a local time or network time source, it will display the date as March 1, 1993.

Here’s an example:

Router> show clock *00:01:10.415 UTC Mon Mar 1 1993 Router>

This date’s appearance on log files is a good indication that no one has set the router’s time source or local time. This is much more likely than the router’s log entries actually dating back to 1993.

Does setting the correct time on a router really matter? While proper time configuration isn’t necessary for a router to fully operate, that doesn’t mean you shouldn’t set the right time. Here are some of the benefits of setting the correct time on a router:

Log files display the proper time stamp, which can help when troubleshooting a problem.
The correct time allows you to make connections between two different times.

Configure the time zone

When setting a router’s (or switch’s) correct time, the first step is configuring the proper time zone. This is the first step for a reason: If you set the time first and then try to set to the time zone, you’ll have to reset the time again.

The key point to remember is that it’s not enough to know that you’re in the Eastern or Pacific time zone. You need to know how many hours you are from Greenwich Mean Time (GMT).

For example, if you’re in the Eastern Standard Time zone in the United States, you’re five hours behind GMT. You would indicate this to the router with -5. If you’re unsure how many hours you are from GMT, the U.S. Navy’s Web site offers a great resource—the World Time Zone Map.

After you’ve determined your time zone value, you can set the time zone. For example, I live in the Central Standard Time (CST) zone, so here’s how I would configure the router:

Router(config)# clock timezone CST -6

Configure Daylight Saving Time

After setting the appropriate time zone, you need to configure the router to adjust for Daylight Saving Time. You can use the summer-time command to accomplish this. Using our CST zone example, here’s how to configure the router to use Daylight Saving Time:

Router(config)# clock summer-time CDT recurring

The summer-time command tells the router to refer to Daylight Saving Time as Central Daylight Time (CDT), which will automatically occur according to predefined dates and times on the router. (You can use the same command to manually set the date and time for Daylight Saving Time.) The recurring option tells the router to use the accepted U.S. Daylight Saving Time rules for the annual time changes in April and October.

Configure the clock

After configuring the time zone and Daylight Saving Time, the last step is to configure the router’s clock. You must do this while in Privileged Mode—not Global Configuration Mode.

If you’ve never done this before, the format can be a bit tricky. Here are some things to keep in mind:

Use the clock set command.
Use military time.
Include seconds when setting the time.
Specify the month using its three-letter abbreviation.
Add the date and the year.

Here’s an example:

Router# clock set 10:50:00 Oct 26 2006

View the time

After configuring the time zone, Daylight Saving Time, and the clock, you can view the clock using the show clock command. Here’s an example:

Router# show clock 10:51:33.208 CDT Thu Oct 19 2006 

Keep in mind that most Cisco routers and switches don’t have internal clocks that store the time when you power them off. That means rebooting a device will lose the set local time. However, the time zone will remain set because the router stores it in its configuration.

For more information on Cisco IOS time configuration, check out Cisco’s documentation. How do you set the time on routers or switches? Do you set it manually or use NTP? What other router and switch topics would you like to see covered? Share your comments in this article’s discussion.

Advertisements
Comments
  1. Dale says:

    Thanks , I’ve recently been looking for information about this topic for ages and yours is the greatest I have came upon so far. However, what in regards to the conclusion? Are you certain concerning the supply?

    • Network Experts Blog says:

      Thanks Dale, it is just simple information to understand timezone and clock and depending on your issue …

  2. Latia says:

    It’s actually a nice and helpful piece of info. I am glad that you just shared this helpful info with us. Please keep us up to date like this. Thanks for sharing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s