Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

syslog date hour problem

hi,

I have ntp running on a pc with syslog.

both, the pc and the router have the correct hour

router:

router#show clock

22:06:51.613 EDT Sun Mar 5 2006

[root@pc~]# date

Sun Mar 5 22:06:51 EST 2006

but then I check my syslog this is what I have.

Mar 5 22:06:51 192.168.76.1 51: router: Mar 6 03:05:00.725: %SYS-5-CONFIG_I: Configured from console by pamirian on vty0 (192.168.76.2)

the first date is the (unix/syslog) date that is correct. the second (03:05:00.725) is the one given by my cisco router. I don't understand why I have (03:05:00.725) when the show clock comment tells me 22:06:51.613 EDT Sun Mar 5 2006....

ideas?

thank you.

3 REPLIES
Bronze

Re: syslog date hour problem

I dont know if this will help but here is what I managed to find:

Some platforms have a hardware clock that is separate from the software clock. In Cisco IOS software syntax, the hardware clock is called the "calendar." The hardware clock is a battery-powered chip that runs continuously, even if the router is powered off or rebooted. After you set the hardware clock, the software clock will be automatically set from the hardware clock when the system is restarted or when the clock read-calendar EXEC command is issued. The time specified in this command is relative to the configured time zone.

Examples

The following example manually sets the hardware clock to 1:32 p.m. on May 19, 2003:

Router# calendar set 13:32:00 May 19 2003

Which platform + IOS version are u running ?

HTH

Arvind

Hall of Fame Super Gold

Re: syslog date hour problem

I believe that the answer is fairly simple. The router knows the correct time but defaults to reporting syslog using UTC. The solution is to use the sevice timestamps log command to get syslog to use the local time instead of UTC.

HTH

Rick

Purple

Re: syslog date hour problem

Can you try the following command:

'service timestamps log datetime msec localtime'

Hope that helps - pls rate the post if it does.

Paresh

177
Views
9
Helpful
3
Replies
CreatePlease to create content