cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3968
Views
5
Helpful
5
Replies

clock set and show log in switch

netman2k5
Level 1
Level 1

I have a question about "clock set" command on Cisco switch: I did a "clock set 20:37:00 pst -8 21 march 2005" but when I do a "show log", it shows different time: March 22 4:39:00. Please the followings:

switch-sanmateo#sh clock

20:37:05.847 pst Mon Mar 21 2005

switch-sanmateo#sh log

Syslog logging: enabled (0 messages dropped, 0 flushes, 0 overruns)

Console logging: disabled

Monitor logging: level debugging, 0 messages logged

Buffer logging: level debugging, 33 messages logged

File logging: disabled

Trap logging: level informational, 219 message lines logged

Log Buffer (9999 bytes):

Mar 22 04:39:05.187: %SYS-5-CONFIG_I: Configured from console by vty1 (172.20.16.1)

switch-sanmateo#wr mem

Building configuration...

[OK]

switch-sanmateo#sh run

Building configuration...

Current configuration : 1875 bytes

!

! Last configuration change at 20:39:05 pst Mon Mar 21 2005

! NVRAM config last updated at 20:37:30 pst Mon Mar 21 2005

!

version 12.1

no service pad

service timestamps debug uptime

service timestamps log datetime msec

service password-encryption

!

hostname switch-sanmateo

!

logging buffered 9999 debugging

no logging console

enable secret xxxx

enable password xxxx

!

clock timezone pst -8

clock summer-time zone recurring

ip subnet-zero

!

What should I do to synchronize these times ? thanks in advance.

5 Replies 5

thisisshanky
Level 11
Level 11

Set the clock command on the switch without the PST -8 command and see if that helps!!!!

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

here is what I get :

switch-sanmateo(config)#clock timezone

% Incomplete command.

switch-sanmateo(config)#clock timezone pst

% Incomplete command.

switch-sanmateo(config)#clock timezone pst ?

<-23 - 23> Hours offset from UTC

any thought ? Thanks.

mhussein
Level 4
Level 4

By default, IOS switches and routers use UTC time for logging and debugging syslogs (in your case UTC is +8 hours from local time).

To force the switch to log using local time use:

switcht(config)#service timestamps log datetime localtime

Regards,

Mustafa

You're absolutely correct. Thanks, Sir.

Thanks for it

 

Review Cisco Networking for a $25 gift card