Operating System - HP-UX
1820235 Members
2992 Online
109620 Solutions
New Discussion юеВ

Re: DST timezone change did not take affect

 
SOLVED
Go to solution
n00body
Advisor

DST timezone change did not take affect

I have a few hpux servers in my environment in Boronia , Australia . Last Sun , 04Oct , 0200 Australia local time , there was a daylight saving time switch . The time did not change accordingly . Indeed , the time server in the ntp.conf were pointing to the correct time server . As a workaround solution , i've stopped the ntp service , then manually change the time according to the DST . I left the ntp service unstarted as it will adjust back the time to non-dst timem if i start it .

Any thought ?

Thank you in advance .
9 REPLIES 9
Hakki Aydin Ucar
Honored Contributor

Re: DST timezone change did not take affect

Probably you need to watch server by issuing command:

ntpq -p

it shows nothing try this:

agui01# ps -ef |grep xntpd
root 1068 1 0 Oct 20 ? 19:07 /usr/sbin/xntpd #you have to see something like that

maybe you need stop|start ntp daemon again:

/etc/init.d/xntpd stop
/etc/init.d/xntpd start
Matti_Kurkela
Honored Contributor
Solution

Re: DST timezone change did not take affect

Your server now has an incorrect idea of UTC time. NTP only transmits UTC time information, so it would return your system to correct UTC time.

All unix systems make all time calculations internally using UTC time (or rather, UTC-derived Unix timestamps) and convert to local time only for human-readable output.

You will need to check that your TZ environment variable has a timezone specifier that matches the correct DST rule block in /usr/lib/tztab. The system default value for the TZ environment variable is set in /etc/TIMEZONE file.

Hmm... Is Boronia in Victoria, near Melbourne? Then your TZ setting should apparently be "EST-10EDT"... and on my not-quite-perfectly-patched 11.23 test system at least, the /usr/lib/tztab seems to indicate that the DST would begin on the last Sunday of October.

You will need a patch for correct DST rules.
For 11.11, the up-to-date tztab patch would be PHCO_39172. For 11.23 the patch number is PHCO_39173 and for 11.31, it is PHCO_39174.

The patch will not force a reboot... but as your system is now living one hour in the future as far as UTC is concerned, a reboot would be the safest way to return to correct timekeeping. Turning the clock back while applications are running may cause grief.

If you hadn't changed your system time, restarting the applications and system daemons would have been enough to make them use the new DST rules.

If your system is 11.00 or older, you will have to edit the tztab file yourself, or download one of the patches listed above and manually extract the new tztab file out of the patch depot.

(A .depot file is just a tar or cpio archive: identify it with the "file" command, use an appropriate command to extract it to /tmp or some other suitable location, then pick out the tztab file from the resulting directory sub-tree.)

You now have a deadline for fixing this: according to the old DST rules, the system will switch to DST on last Sunday of October, i.e. 2009-10-25. If you haven't fixed the tztab before that, your system will then automatically switch to DST, causing your local time to be off by 1 hour again.

For the future reference: whenever the government announces a change to the DST transition times, you should be thinking "I need to find and install a tztab patch before the next DST transition".

MK
MK
Dennis Handly
Acclaimed Contributor

Re: DST timezone change did not take affect

What is your current UTC/GMT time?
date -u
It should be about 14:39 GMT.
Dennis Handly
Acclaimed Contributor

Re: DST timezone change did not take affect

>MK: /usr/lib/tztab seems to indicate that the DST would begin on the last Sunday of October.

Yes, Clay's dst.pl shows:
$ TZ=EST-10EDT dst.pl
Sun Mar 29 02:59:59 EDT 2009 --> Sun Mar 29 02:00:00 EST 2009
Sun Oct 25 01:59:59 EST 2009 --> Sun Oct 25 03:00:00 EDT 2009

>whenever the government announces a change to the DST transition times

Hopefully your government will be kind enough to give several years notice. :-)
Like the Energy Policy Act of 2005 for the US.
n00body
Advisor

Re: DST timezone change did not take affect

Hi Hakki ,
Restarting xntp service will return the system back to non-DST time . that's the reason i changed the time manually and left the xntp service not started .

@Matti ,
# more /etc/TIMEZONE
TZ=EST-10EDT
export TZ

I think you are almost correct . According to the tztab file , this is the header

"# more /usr/lib/tztab
@(#) tztab $Date: 2006/01/24 23:27:32 $Revision: r11.11/1 PATCH_11.11 (PHCO_3434
2)"

Looking at the latest patch , PHCO_39172 - it is superseeded PHCO_34342 .

Would this means that applying PHCO_39172 on this 11.11 will totally resolve this issue ?

@Dennis ,
# date -u
Wed Oct 7 14:34:01 UTC 2009


I've attached the current tztab .
Matti_Kurkela
Honored Contributor

Re: DST timezone change did not take affect

Please view the patch notes for PHCO_39172:

http://www11.itrc.hp.com/service/patch/patchDetail.do?patchid=PHCO_39172

The third Symptom from the top:
-----------
PHCO_37720:
( QX:[...issue tracking gobbledygook...] )

tztab(4) needs to be modified for Australian Daylight Saving changes.
-----------

I don't think it can be said much clearer than that. HP seems to be saying that this patch *definitely* contains tztab modifications for Australia.

The fix originally appeared in PHCO_37720 (which is also newer than what you currently have) but PHCO_39172 has already superseded it and of course includes the fix too.

Please read also the "Special Installation Instructions" chapter at the end of the patch notes. In this case, it tells exactly what this patch does and how to deal with tztab patches when you have a chance to do it before the D-Day.

As this patch affects tztab *only*, I don't see any reason to pick anything other than the latest applicable patch in this case.

In your specific case, you must then also undo the +1h offset you introduced to the UTC-based system clock and re-enable NTP time synchronization. Because this means turning the system clock backwards, you definitely should stop the applications while you do it. Stopping the applications also ensures that they will be using the new tztab.

MK
MK
Bill Hassell
Honored Contributor

Re: DST timezone change did not take affect

> Restarting xntp service will return the system back to non-DST time . that's the reason i changed the time manually and left the xntp service not started .

The reason that the time seemed to jump is that your local time is being displayed and interpreted incorrectly. When you start xntpd (using the start/stop script in /sbin/init.d), the first step is to 'jump' the time to the correct UTC value. There is only one time in HP-UX and that is UTC. Because your current TZ value is pointing to an entry in /usr/lib/txtab, then the UTC time is translated to the value you see in your shell prompt.

In other words, your server will have the correct time when xntpd is started. But your /usr/lib/tztab file is translating the display to the wrong information. Leave xntpd running and fix your /usr/lib/tztab file. NOTE: timezones are political definitions and have very little to do with how the world rotates. You can modify tztab yourself to define the correct DST change or you can assign the correct value in /etc/TIMEZONE. Read the man page for environ, specifically the TZ definition. You can create your own personal timezone with *any* offset and whatever switchover date you want to use.

> Looking at the latest patch , PHCO_39172 - it is superseeded PHCO_34342 . Would this means that applying PHCO_39172 on this 11.11 will totally resolve this issue ?

The patch is nothing more than a copy of the latest tztab file from HP. It is quite difficult to keep the dozens of locally defined timezone rules up to date. When a change in the rules occurs in your local area, you can safely assume that it will take some time to get the latest rules into a patch and distributed. That's why you have the option to edit the tztab file yourself.

According to PHCO_39172, Australian time was updated in PHCO_37720, so your PHCO_34342 patch is extremely outdated. The patch requires no reboot, is very low risk and can be backed out very quickly. When you download and install the patch, compare your old tztab file with the one in the patch. That will tell you if it has been updated.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: DST timezone change did not take affect

># date -u
Wed Oct 7 14:34:01 UTC 2009

As MK said, you are an hour too fast.

After I downloaded the latest tztab(4) patch PHCO_39173, I now get what you want:
$ TZ=EST-10EDT dst.pl
Sun Apr 05 02:59:59 EDT 2009 --> Sun Apr 05 02:00:00 EST 2009
Sun Oct 04 01:59:59 EST 2009 --> Sun Oct 04 03:00:00 EDT 2009
mvpel
Trusted Contributor

Re: DST timezone change did not take affect

Implementation dates of Daylight Savings Time in Australia:

http://www.bom.gov.au/climate/averages/tables/dst_times.shtml

The change for the current patch was probably the April 12, 2007 legislation, which gave folks a year of advance notice for the change to go into effect in 2008.

There's probably going to be another patch coming up soon, since WA just rejected DST earlier this year after a three-year trial which started December 3, 2006.

http://www.worldtimezone.com/dst_news/dst_news_australia15.html