Ok so today I came accross this issue where syslogs on a switch were reporting the incorrect time.
Switch#show logg
......
Sep 5 05:16:47.835: %SYS-5-CONFIG_I: Configured from console by xxxxx on vty0 (10.0.0.10)
The show clock command was issued to verify that the switch is displaying the correct time. Yep, everything ok here.
Switch#show clock
14:46:56.898 ACST Mon Sep 5 2011
Next step is to confirm that NTP is working and we are associated with our NTP servers. Again everything seems good.
Switch#show run | in ntp|clock
.....
ntp server 192.168.10.10
ntp server 192.168.20.10
clock timezone ACST 9 30
Switch#show ntp associations
address ref clock st when poll reach delay offset disp
+~192.168.10.10 .GPS. 1 29 128 377 1.0 0.13 0.7
*~192.168.20.10 .GPS. 1 57 128 377 0.9 0.17 0.3
* master (synced), # master (unsynced), + selected, - candidate, ~ configured
Switch#show ntp status
Clock is synchronized, stratum 2, reference is 192.168.20.10
nominal freq is 119.2092 Hz, actual freq is 119.2086 Hz, precision is 2**18
reference time is D20EDA3E.6E1CD364 (14:48:54.430 ACST Mon Sep 5 2011)
clock offset is 0.1531 msec, root delay is 0.92 msec
root dispersion is 1.60 msec, peer dispersion is 1.05 msec
Ok time to check the running config again. Aha, there is the issue. We have not specified the timezone component for debugging and logging output.
Switch# show run | in timezone
service timestamps debug datetime msec
service timestamps log datetime msec
So in our running config we need to specify our debug and log output to use our local timezone.
Time to update the config.
Switch(config)#service timestamps debug datetime msec localtime show-timezone
Switch(config)#service timestamps log datetime msec localtime show-timezone
Switch(config)#exit
Now when we review our logs they will display the correct time.
Switch#show logg
......
Sep 5 14:47:22.590 ACST: %SYS-5-CONFIG_I: Configured from console by xxxx on vty0 (10.0.0.10)