You can use the service timestamps command to format timestamps for log messages. By default, log messages display universal coordinated time (UTC) without the time zone.
The following examples illustrate how you can change the timestamp on log messages.
- host1(config)#clock timezone EDT -5
host1(config)#service timestamps log datetime host1#exit host1#show log data category cliCommand severity info *********************************************************** NOTICE 05/14/2001 18:24:49 cliCommand: "configure terminal", console NOTICE 05/14/2001 18:24:45 cliCommand: "service timestamps log datetime", console ***********************************************************
host1#configure terminal host1(config)#service timestamps log datetime show-timezone host1(config)#exit host1#show log data category cliCommand severity info *********************************************************** NOTICE 05/14/2001 18:28:45 UTC EDT cliCommand: "configure terminal", console NOTICE 05/14/2001 18:28:42 UTC EDT cliCommand: "service timestamps log datetime show-timezone", console ***********************************************************
host1#configure terminal host1(config)#no service timestamps host1#exit host1#show log data category cliCommand severity info *********************************************************** NOTICE 134 cliCommand: "configure terminal", console NOTICE 133 cliCommand: "no service timestamps", console ***********************************************************
service timestamps