Operating System - HP-UX
1753760 Members
4993 Online
108799 Solutions
New Discussion юеВ

Re: Dazed and Confused on NTP

 
timothy carroll
Advisor

Dazed and Confused on NTP

We setup our hp-ux 11.23 boxes to use an ntp server. My boss is worried what will happen when DST kicks in this month - will the ntp server change the date on all the clients without any interuption
14 REPLIES 14
Jannik
Honored Contributor

Re: Dazed and Confused on NTP

NTP always transmits UTC time only. This means daylight saving time is not an issue for NTP.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1341443
jaton
Wouter Jagers
Honored Contributor

Re: Dazed and Confused on NTP

More important is that all your machines are configured in the right DST timezone. Easiest to double check the output of the "date" command on each box, I'd say.

Cheers
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
timothy carroll
Advisor

Re: Dazed and Confused on NTP

I guess this is what confuses me - once they are all synched and xntpd is running - if I manually change clock ten minutes on one the clients - why does it not sync back up after a little while
TTr
Honored Contributor

Re: Dazed and Confused on NTP

> manually change clock ten minutes on one the clients - why does it not sync back up after a little while

How long does it take to switch back? NTP has certain controls and behaviors about changing the time. In almost all cases you don't want the time to be corrected in one big step while the servir is running in a production environment.

Take a look at tis page for DST and other useful links http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00860404&cc=us&dlc=en&lc=en&jumpid=reg_R1002_USEN
Matti_Kurkela
Honored Contributor

Re: Dazed and Confused on NTP

NTP deals only with UTC time, so the NTP server does not "change the date" on DST transition in any way, shape or form.

UTC time is the basis of timekeeping in all Unix systems. All timestamps are converted to UTC (or rather, UTC-equivalent Unix time_t) for processing, and back to local time for display as necessary.

In a Unix system, only two things change on DST transition:
- the conversion offset for timestamps
- the time zone identifier (changes from Daylight version to Standard version or vice versa, e.g. EDT <-> EST)

The DST logic is also applied whenever past or future dates are displayed. When converting the internal timestamp to human-readable format, the system checks "Is this date supposed to be DST or Standard time?" and converts them accordingly.

Therefore, the Unix DST routine is not something that is used only twice a year: it is used exactly the same way every time a time value is displayed.

Of course, when a programmer explicitly specifies the timezone to be used for output instead of relying on system defaults, he/she can also override the DST logic if necessary, causing summer dates output in Standard time or winter dates in DST - but this is usually not required nor desired.

So each Unix host must have up-to-date DST rules. In HP-UX, these rules are stored in /usr/lib/tztab and chosen with the TZ environment variable.

This thread includes the dst.pl script which can be used to verify that your timezone information is correct and the next conversion will happen when it's supposed to:

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1007176

For the patches required for correct U.S. DST transition with post-2007 rules, see:

http://www.hp.com/go/dst

If you need correct timezone information for non-US systems, go to itrc.hp.com HP-UX patch search and use the keyword "timezone". HP-published timezone information patches are guaranteed to affect /usr/lib/tztab *only*, so getting the Change Control approval to install them if necessary should not be difficult.

MK
MK
TTr
Honored Contributor

Re: Dazed and Confused on NTP

While throwing URLs at you, here is another one.
http://forums.itrc.hp.com/service/forums/helptips.do?#28

Fron the "timothy carroll- Forum profile",
http://forums13.itrc.hp.com/service/forums/publicProfile.do?userId=WW149553&forumId=1
"I have assigned points to 0 of 32 responses to my questions"
timothy carroll
Advisor

Re: Dazed and Confused on NTP

ok - for us knuckleheads - me in particular -
i change my system date from Tue Oct 13 15:50:43 EDT 2009 to Tue Oct 13 15:55:43 EDT 2009


A 5 minute change - will it get synched back up ?

Simple question
TTr
Honored Contributor

Re: Dazed and Confused on NTP

If NTP is configured properly it will be slowly adjusted back to the correct time. Check the time now. the difference should be less than 5 minutes already. If not, you need to check the nTP functioning and configuration.
Wouter Jagers
Honored Contributor

Re: Dazed and Confused on NTP

Not automagically, since xntpd does not make such 'big' adjustments.

When you restart xntpd it will probably be corrected, because it will call ntpdate once at startup, unless otherwise configured. And ntpdate does allow itself to make such a big change.

So, in short: only when you restart xntpd.

Cheers
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.