cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
576
Views
0
Helpful
4
Replies

clock set

acbenny
Level 1
Level 1

Hi all,

I want to set the clock of switch and I have typed clock set 12:00:00 4 Sep 2007 to do it..

When I issue "show clock" command the time is match with the current time.

4948A#sho clock

12:01:21.427 UTC Tue Sep 4 2007

But when I "show logging" ----time is not match with current time. How can I make it to current time?

02:16:27: %SYS-5-CONFIG_I: Configured from console by console

02:16:44: %SYS-6-CLOCKUPDATE: System clock has been updated from 21:03:31 UTC Mon Sep 3 2007 to 12:00:00 UTC Tue Sep 4 2

007, configured from console by console.

02:17:10: %SYS-5-CONFIG_I: Configured from console by console

4 Replies 4

mohammedmahmoud
Level 11
Level 11

hi,

You can set the clock via this command "clock set 12:00:00 4 Sep 2007" (this command is entered in the enable mode, not the global configuration mode) but be aware that this clock will be reset when the router/switch reloads and will need to be reconfigured, the other recommended method is to use ntp if you are connected to the internet:

http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/ffun_c/fcfprt3/fcf012.htm#wp1001170

http://www.pool.ntp.org/

HTH,

Mohammed Mahmoud.

Pavel Bykov
Level 5
Level 5

Hello Jack.

Please use the following commands:

service timestamps debug datetime msec localtime

service timestamps log datetime msec localtime

This will enable logging to use your set time.

Hope this helps.

Please rate all helpful posts.

Hi,

Sorry Jack, missed your main concern, and i think that Pavlo has covered it (using the service timestamps to reflect the time in the logging, its is most probably using "uptime" in your configuration, changing it with "datetime" will solve your issue).

HTH,

Mohammed Mahmoud.

mruuth
Level 1
Level 1

You need this command:

service timestamps log datetime localtime

Pls Rate

Reagard

Mats

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: