General
cancel
Showing results for 
Search instead for 
Did you mean: 

Making two NTP servers as peer with different timezones

Leonard C.
Frequent Advisor

Making two NTP servers as peer with different timezones

There are two NTP servers with two different timezones but with a same time!
Suppose that one is Central America Time and the other one is GMT.
But because of some reasons the time is same and we can't change time or timezone.
I want to make these two NTP servers as peer together. But because of timezone difference the time of one server will be changed.
Is there any way to peer two NTP servers only on date and time without concern of timezone.

Thanks.
2 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: Making two NTP servers as peer with different timezones

Hi Leonard:

NTP works in UTC so this is not a problem. In fact, a server synchronized with a valid time source can use mutliple 'TZ' variable settings to satisfy the local, geographic sense of time for different users. For example, a user logging in from London, England would think it was 1300 whereas a user logging in from New York in the US would perceive the time to be 0800. Different user profiles would have different 'TZ' settings. The server servicing the London and New York users could be synchronized with time sources anywhere (although servers closest to it would probably provide the most consistent undrifting time).

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: Making two NTP servers as peer with different timezones

Timzones in HP-UX are nothing more than translations -- HP-UX never changes time, it is always UTC (aka, GMT or Zulu). NTP never knows anything about local timezones. When you type the command: date -u, you are seeing the HP-UX system time. Without the -u, then the date command (and all library routines for time) will follow the rules in /usr/lib/tztab to translate the internal HP-UX time into a form suitable for your local timezone.

You can see this by temporarily change the TZ value (which is a flag to look in the tztab file):

TZ=GMT0 date
TZ=PST8PDT date
TZ=CST6CDT date

By temporarily setting TZ, the date command shows you the time translated for the specified zone. So there is nothing to be concerned about for servers in different locations around the world. Just use the closest NTP-pool server set to synchronize to UTC, then login to each one and use the date -u command to see that no matter where they are, the internal time is GMT0. To verify that each remote server can correctly represent time for a different timezone, use the above commands.

The NTP-pool is extremely accurate (to within 1 second) so all your seervers will be exactly the same around the world. No need to use peer connections.


Bill Hassell, sysadmin