01-25-2006 07:35 AM
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.
01-25-2006 07:37 AM
Try adding the following command to your config:
service timestamps log datetime show-timezone
08-08-2012 04:40 AM
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
08-08-2012 10:50 AM
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
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: