03-21-2005 08:53 PM - edited 03-02-2019 10:13 PM
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.
03-21-2005 10:24 PM
Set the clock command on the switch without the PST -8 command and see if that helps!!!!
03-21-2005 10:41 PM
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.
03-21-2005 10:32 PM
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
03-21-2005 10:59 PM
You're absolutely correct. Thanks, Sir.
08-24-2021 12:10 AM
Thanks for it
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide