cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
327
Views
9
Helpful
3
Replies

syslog date hour problem

pamirian76
Level 1
Level 1

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 3

arvindchari
Level 3
Level 3

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

Richard Burts
Hall of Fame
Hall of Fame

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

HTH

Rick

pkhatri
Level 11
Level 11

Can you try the following command:

'service timestamps log datetime msec localtime'

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

Paresh

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: