09-25-2021 04:03 AM
Hello Everyone,
is it necessary to set timezone after NTP is configured?
Thanks.
Regards,
shrijan
Solved! Go to Solution.
09-25-2021 01:40 PM
Hello @shrijan ,
>> So once our device is synced with NTP server, then we check the difference of hours between the synced time and the local time in our device. Then with that difference we configure again the timezone like GMT +2 (example) such that it matches the local time.?
yes, your understandng is correct
Hope to help
Giuseppe
09-25-2021 04:20 AM
Timezone is a matter of convenience.
09-25-2021 04:24 AM
YES / NO
As i know - But when the device booting it looking for the Local Time zone/clock set -You can configure the time zone and summertime (daylight saving time) setting for your device.
While device booting, the device does not have NTP sync configuration. - NTP does not recognize time zones, instead, it manages all-time information based on UTC.
More information and best practice can be find here :
https://www.cisco.com/c/en/us/support/docs/availability/high-availability/19643-ntpm.html
09-25-2021 05:08 AM - edited 09-25-2021 05:09 AM
Hello @shrijan ,
without a time zone when NTP is synchronized your router clock will be UTC with no offset
The timezone provides a way to add an offset( positive or negative ) to UTC to have your local time on the router.
It is something that helps us as human beings in reading timestamps of log messages and debug messages but it is not mandatory.
Some big ISPs that span over multiple time zones can even choice to use UTC on all their routers/switches to have a single time.
Hope to help
Giuseppe
09-25-2021 05:42 AM
"Some big ISPs that span over multiple time zones can even choice to use UTC on all their routers/switches to have a single time."
BTW, not just big ISPs, I've found Enterprises, that have offices in different time zone, might also just use UTC. It makes it easier to correlate events between devices within different timezones.
Also BTW, timezones can zigzap around the geography and DST might not be used. I.e. using local timezone is convenient when you and the device are in the same timezone, but can be "interesting" when you're not.
One aspect of "time" that I kept bumping into, at least (and in the past) on Windows devices, was if you were doing backups based on changed file timestamps, Windows often considered everything had a changed timestamp when DST went "on" or "off".
09-25-2021 07:49 AM
without a time zone when NTP is synchronized your router clock will be UTC with no offset..
>>> so my point is let say right now the real local time is 5pm in my country and after i configured NTP, if the device is also showing 5 pm which matches the real time then do i still need to configure timezone?
in which situation do i need to configure both NTP as well as timezone?
09-25-2021 08:53 AM
Hello @shrijan ,
I have recently configured an NTP server for a router of one of our customers.
First I did it without any time-zone command.
The router has a scheduled reload everynight at 4:45 am.
The day after checking it again I saw that the router had reloaded at 6:45 am local time and the clock was UTC.
I live in Europe so I have added timezone CEST with summer time daylight saving we are GMT or UTC + 2 hours now.
On the third day I have checked again and I had the router with a clock following the local time zone.
Be aware that the lack of time-zone commands is not evident immediately.
Also to be able to synchronize your device clock must be within 128 seconds of difference with the correct time (NTP v3)
Some devices left in free running like the router I have mentioned above show clock derivation in my case it was losing two minutes per day. ( with no NTP server available )
You can check using
show ntp status
show ntp assocations
It can take some time to sync
In the end it is your choice to use or not the time-zone command.
Hope to help
Giuseppe
09-25-2021 09:56 AM
hmm let me try put it in very simple way.. i hope it will say what you have said.
So does it mean when we set NTP server, does not necessary to have exact local time? Like you have said after you have set NTP server your router was reloading two hours late than the set time (local time).
So, setting up NTP server does not mean to setting or receiving the time in local time accurately. It just means to sync with the NTP authorative server and whenever there is some changes in time in NTP authorative server it automatically changes in our device. (No need to check time to time)
So once our device is synced with NTP server, then we check the difference of hours between the synced time and the local time in our device. Then with that difference we configure again the timezone like GMT +2 (example) such that it matches the local time.
Is it like that?
Thank you for your reply. It is very informative and helpful.
09-25-2021 01:40 PM
Hello @shrijan ,
>> So once our device is synced with NTP server, then we check the difference of hours between the synced time and the local time in our device. Then with that difference we configure again the timezone like GMT +2 (example) such that it matches the local time.?
yes, your understandng is correct
Hope to help
Giuseppe
09-25-2021 03:36 PM - edited 09-25-2021 03:37 PM
In addition to Giuseppe's last post, i.e. adjusting to local time, if your time also uses DST (daylight savings time), you'll want to configure for that too. Otherwise, when your local time leaps forward or falls back, your time on your network device won't.
BTW, don't know if it's still true, but it used to be on Cisco devices, that have an on-board clock, you also configure it to sync the on-board clock with NTP too. This way, during a reload, the device will often boot up with a time very close to NTP's before it syncs with NTP.
09-25-2021 07:53 AM
one thing confuses me now:
let say i live in east africa and local time is 5 Pm now. So if i configured NTP let say the authorative server is Canada server and in canada the time is 10 pm, does this mean in my device if i point my NTP server to canada the time will be set as 10 pm?
09-25-2021 09:00 AM
Hello @shrijan ,
no the reference time in NTP is always in UTC so your router will go in sync with UTC time regardless of the fact that Canada is -5 hours on the East Coast ( I have relatives in Quebec).
The more you go to East the more positive offset you get from UTC so for example Japan is 9 hours in advance then Europe Central time so it should be something like UTC+11 hours
Hope to help
Giuseppe
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