Operating System - HP-UX
1820499 Members
2616 Online
109625 Solutions
New Discussion юеВ

Re: Daylight saving introduced in Western Australia

 
SOLVED
Go to solution
Lars-Olof Fermvall
Frequent Advisor

Daylight saving introduced in Western Australia

Western Australia have, for the first time, introduced Daylight Saving. The systems at the customer site are at HP-UX 10.20, but assuming that the format of tztab has not changed, I looked at later patches. Nothing. I am trying to make up my own changes to tztab, so if anybody have some clues, it would be appreciated. Do I have to use a User Defined tiem zone setting, for instance
Nemo enim saltat sobrius, nice forte insanit
13 REPLIES 13
James R. Ferguson
Acclaimed Contributor

Re: Daylight saving introduced in Western Australia

Hi:

You can modify '/usr/lib/tztab' according to your needs if no patches exist. The name you choose for your timezone can match an existing one or be wholly defined by you.

Follow the example and discussion in the manpages for 'tztab(4)'.

When you have made your modifications, at least stop and restrart 'cron'. A reboot at your convenience to restart all long-running processes (e.g. databases) is ideal.

Regards!

...JRF...


Lars-Olof Fermvall
Frequent Advisor

Re: Daylight saving introduced in Western Australia

G'Day,
You confirmed that I was on the right track - thanks! I've attached what I packaged up for people to use on sites - hopefully not too far wrong...
Nemo enim saltat sobrius, nice forte insanit
Dennis Handly
Acclaimed Contributor

Re: Daylight saving introduced in Western Australia

Something wrong here. Don't your politicians give you notice years in advance? ;-)
Dennis Handly
Acclaimed Contributor

Re: Daylight saving introduced in Western Australia

>I've attached what I packaged up for people to use on sites

In general, unless you are making up a new timezone you should have rules for previous years. But I suppose if you don't list them, you didn't have them.

For your first line, you seem to want to say Dec 3, instead saying first sunday. Both will work but someone has to think why you have the day of week field different.
0 2 3 12 2006 0-6 WADT-9 (old)
0 2 1-7 12 2006 0 WADT-9 (new)

I assume you know what it means when you have 2 in the second field? (It doesn't match USA's.)

What you have goes from 0059 WAST to 0200 WADT. And then from 0259 WADT to 0200 WAST.
Andrew Merritt_2
Honored Contributor
Solution

Re: Daylight saving introduced in Western Australia

Hi Lars,
PHCO_33081 was the latest patch for 11.00 which updates tztab, there are however no entries for Western Australia.

(The equivalent patches for 11.11 and 11.23 are PHCO_34668 and PHCO_34669, respectively.)

It looks as though this was a change introduced at very short notice, and not enough time was allowed to let companies such as HP provide the required fixes. There will be patches for 11.00, 11.11 and 11.23 to provide the fix required.

The entries added by the patch are:
# Australian Western Standard Time, Australian Western Daylight Time
#
# This entry has been created for the trial daylight savings period
# in the Australian state of Western Australia. This entry only
# covers the trial period and additional changes will be required
# to extend entry if the referendum on daylight savings accepts
# daylight savings permanently.
WST-8WDT
0 3 3 12 2006 0-6 WDT-9
0 3 25-31 10 2007-2008 0 WDT-9
0 2 25-31 3 2007-2009 0 WST-8

JAGag24673 is the change request for this, if you have ITRC access.

Andrew

Bill Hassell
Honored Contributor

Re: Daylight saving introduced in Western Australia

One of the best features in HP-UX is the handling of timezone rules. As Dennis points out, you simply add the new rules to the tztab file. The change takes place immediately as this file is consulted by the standard library calls. Another man page to check is: man environ

Note that a reboot will be necessary sometime prior to the next time change to allow persistent or daemon processes to inherit the new TZ variable and possibly update their internal tables. Once you create the new tztab entry, you can verify the change dates with the attached script from Clay. It allows you to test both past and future years. Note that there is only one place to change the global TZ value: /etc/TIMEZONE Change this file and all new logins will inherit the latest TZ value.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: Daylight saving introduced in Western Australia

>Bill: One of the best features in HP-UX is the handling of timezone rules

Linux and the Mac do it slightly better by having separate files and directories for various zones.

>The change takes place immediately as this file is consulted by the standard library calls

I'm not sure if this file is re-read by long running user processes. I think libc caches the values and I don't think it stats tztab everytime you want the time.
Lars-Olof Fermvall
Frequent Advisor

Re: Daylight saving introduced in Western Australia

Dennis,
No, I suppose we have the politicians we deserve... And , yes, I had stuffed up a couple of things, being in too much of a hurry and not so proficient (repent at leisure) - thanks!

Andrew,
Most useful contribution, which got completely right. MicroSoft only got their patch out just now, and when another system got that installed, the time difference to the HP-UX boxes became an issue. I edited the text into a copy of the file, since there will be no more patches for 10.20 anyway.

Bill,
Thanks for the tip about /etc/TIMEZONE. Re-boots (which fixes this) will be required for other reasons in this particular case. I can not download the attached file from my IE, for some reason ("No such interface supported")

Thank you all for you help and all the best!
Lars
Nemo enim saltat sobrius, nice forte insanit
Bill Hassell
Honored Contributor

Re: Daylight saving introduced in Western Australia

IE should download it -- but save to disk, don't run it because it has the extension .pl which is just a shorthand for Perl files. But if IE still doesn't work, the fix is easy:

http://www.mozilla.com/en-US/firefox/

This solves a lot of IE problems...


Bill Hassell, sysadmin
Lars-Olof Fermvall
Frequent Advisor

Re: Daylight saving introduced in Western Australia

Bill,

You are correct - Firefix does solve IE problems! I've downloaded the script and run it on my ancient (10.20) system. After fixing the Perl path to match what I had, it ran well. Thanks!
Nemo enim saltat sobrius, nice forte insanit
A. Clay Stephenson
Acclaimed Contributor

Re: Daylight saving introduced in Western Australia

Dennis is quite correct about the caching of tztab entries. There was actually a performance patch for this. Originally, ctime-like functions reread the file each time but that was an obvious performance hit so the code was changed to cache a given txztab entry so that once a process is running, the file is not re-read. It was a tradeoff between performance and latency and performance (in my view, wisely) won.
If it ain't broke, I can fix that.
Lars-Olof Fermvall
Frequent Advisor

Re: Daylight saving introduced in Western Australia

G'Day Clay,

Thanks for that - I understand you wrote the Perl script in question.

I will close this thread now.

Regards,
Lars
Nemo enim saltat sobrius, nice forte insanit
Lars-Olof Fermvall
Frequent Advisor

Re: Daylight saving introduced in Western Australia

Problem is solved, as well as several new (to me) aspects of time zone handling have been brought up.

Again, thanks to all contributors!
Lars
Nemo enim saltat sobrius, nice forte insanit