cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
17126
Views
80
Helpful
6
Replies

Log appears in UTC time

alexander76
Beginner
Beginner

Hi Cisco NetPros,

i have a short question:

We are using several Cisco1841 routers.

The show clock command gives the output which i expect (Time = NTP time).

But the show log command give the output with a time stamp from UTC (i have to add 1 hour to get our real time here in germany).

Most of our other cisco equipement shows the correct time in the logs (UTC+1). Only the 1841s show UTC (not +1) in the log. Can i configure the 1841s, so they will give back the NTP time in the logs?

What would be the command to do this?

Thanks in advance for your answers!

Alexander

6 Replies 6

adamclarkuk_2
Enthusiast
Enthusiast

Hi

Try this

service timestamps log datetime localtime show-timezone

thank you very much adam.

it works!!!!!

alexander76
Beginner
Beginner

hi adam,

thanks for your quick answer.

if i do as you have supposed, i turn back my system time to gmt. then the logging time and the ntp time are equal.

unfortunately thats not the affect wanted.

in germany we have gmt+1. i may not turn back the system time on the routers in setting it to gmt+0.

can't i set the logging time equal to the time NTP gives to the router. can i turn off UTC/GMT+0 for logging and use gmt+1 instead....

thanks in advance,

alexander

This command should do it, I corrected my post but you must have read it already

service timestamps log datetime localtime show-timezone

Works a treat for me on my 2851!

Cheers

Mick

Dec 14 16:52:41 CAT: %PARSER-5-CFGLOG_LOGGEDCMD: User:administrator logged command:service timestamps log datetime localtime show-timezone
Dec 14 16:52:43 CAT: %SYS-5-CONFIG_I: Configured from console by administrator on vty0 (172.16.4.145)
ASW-001#

 

ASW-001#sh clock
16:55:49.847 CAT Mon Dec 14 2020
ASW-001#

Changes the timezone but not the clock for me, am I missing something?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers