1832509 Members
4804 Online
110043 Solutions
New Discussion

NTP & time change

 
Ravinder Singh Gill
Regular Advisor

NTP & time change

We are looking after some Unix servers for a client. We have setup those servers as NTP clients to one of their servers (to which all of their other servers synchronize for time). The question is what will happen when there is to be a time change i.e. daylight saving etc?
4 REPLIES 4
Pete Randall
Outstanding Contributor

Re: NTP & time change

You might want to take a look at the man page for cron. There is a section that describes the "Spring and Autumn Time Transitions" that may help.


Pete

Pete
Ivan Ferreira
Honored Contributor

Re: NTP & time change

All servers should use the same timezone. The timezone has the value that indicates when DST time is in use. So, you don't need to manually change the time, you should ensure that you time zone uses DST, and all servers will show the correct time.

You can also create your own timezone rules for specify when to start and end the DST.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
James R. Ferguson
Acclaimed Contributor

Re: NTP & time change

Hi Ravi:

NTP uses UTC (GMT) time. What you (your sever) perceives as the correct time is handled with the TZ setting. You can see this by doing something like:

# date
Wed Nov 30 07:22:31 EST 2005
# TZ=PDT date
Wed Nov 30 12:22:36 PDT 2005

Notice that in the second call of 'date' I temporarily set my timezone to American Pacific Daylight Time instead of my Eastern Standard time.

The rules for daylight savings changes (if any) are cataloged in '/usr/lib/tztab' with the explanation of the format in the 'tztab(4)' manpages.

There is nothing you need to do other than setup NTP and your correct timezone in '/etc/TIMEZONE'. The later file is read by '/etc/profile' during login to set the correct 'TZ' value in your shell's environment.

Regards!

...JRF...
Regards!

...JRF...
Ravinder Singh Gill
Regular Advisor

Re: NTP & time change

Our timezone is set to TZ=GMT0BST
and I contacted our client who look after the NTP server and they say their server (may not be Unix) is set to GMT0. I was told this will change to GMT1 when time changes. Hence Should I assume that our timezone will automatically be set to GMT1BST and that they are both correctly setup???