Time Stamps wrong in log.

Answered Question
May 8th, 2007
User Badges:

I'm having an issue with a few of the routers on my network. The output of the show clock command displays the correct time, but the log entries are off by about 5-ish hours. Is the router sitting in a time-warp? Events are happening in the future(?) :P


Ex:

May 8 17:39:05.144: %ENTITY_ALARM-6-INFO: ASSERT MINOR AT1/0 Physical Port Link Down


<hostname>#sh clock

12:45:51.975 cdt Tue May 8 2007


Config is as such:

clock timezone cst -6

clock summer-time cdt recurring 2 Sun Mar 2:00 1 Sun Nov 2:00

ntp clock-period 17179830

ntp update-calendar

ntp server <IP of NTP Server> prefer


The router that I copied the above example from is a 7206 running:

Version 12.4(7b)


I also see this problem with some other 7206s as well as a few 1841s. Doesn't seem to be any correlation. Ideas why this is??

Correct Answer by Joe Clarke about 9 years 11 months ago

The log messages are showing a UTC time stamp. Please include the service portion of the config as well. You probably want to add:


service timestamps log datetime localtime

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Correct Answer
Joe Clarke Tue, 05/08/2007 - 09:57
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

The log messages are showing a UTC time stamp. Please include the service portion of the config as well. You probably want to add:


service timestamps log datetime localtime

att0055rj Tue, 05/08/2007 - 10:06
User Badges:

As requested:

service timestamps debug datetime msec

service timestamps log datetime msec


Joe Clarke Tue, 05/08/2007 - 10:12
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

Yep, just add a localtime in there, and you'll get localized time stamps. You might also want to add show-timezone to see to what timezone they're localized. And because I'm pedantic, timezones are usually written in all upper case (i.e. CST and CDT).

Actions

This Discussion