×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

syslog date hour problem

Unanswered Question
Mar 5th, 2006
User Badges:

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

[[email protected]~]# 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.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (2 ratings)
Loading.
arvindchari Sun, 03/05/2006 - 19:24
User Badges:
  • Bronze, 100 points or more

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 Sun, 03/05/2006 - 19:26
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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

pkhatri Sun, 03/05/2006 - 19:27
User Badges:
  • Purple, 4500 points or more

Can you try the following command:


'service timestamps log datetime msec localtime'


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


Paresh

Actions

This Discussion