show log has incorrect date & time

Unanswered Question
Jan 25th, 2006

The "show clock" command displays the correct time that is obtained using ntp. However, when issuing a "show log" command the output does not contain the date and time, but rather a code such as "2w5d:" at the beginning. Is it possible to change this output to display the date & time?? Thanks in advance.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 0 (0 ratings)
nhabib Wed, 01/25/2006 - 07:37

Try adding the following command to your config:

service timestamps log datetime show-timezone

david.mitchell@... Wed, 08/08/2012 - 04:40

Hi nhabib,

This worked for me so thanks.

My script was slightly different as follows:

service timestamp log datetime msec localtime show-timezone

Thanks again

David

Richard Burts Wed, 08/08/2012 - 10:50

David

If the original poster had looked in the router config he would have found a command service timestamps log uptime. This is the default on many versions of IOS and will display the amount of time (2 weeks 5 days in the original post) that the router has been up.

There are a number of optional parameters that can be used and you used several of them. The important thing is that you need to use at least service timestamps log datetime. This will give you the date and time rather than the uptime. Beyond that you can specify other parameters to specify how you want the time displayed.

HTH

Rick

Actions

Login or Register to take actions

This Discussion

Posted January 25, 2006 at 7:35 AM
Stats:
Replies:3 Avg. Rating:
Views:934 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard