1752785 Members
6411 Online
108789 Solutions
New Discussion юеВ

Time Zone TZ New Zealand

 
SOLVED
Go to solution
kate32
Frequent Advisor

Time Zone TZ New Zealand

Hi,

What is the correct timezone for New Zealand:
TZ=NZST-12NZDT or NZST-12NZDT,M9.5.0/02:00,M4.1.0/03:00 ?

Need to be sure it is setted correctly before the new change date in September

Cheers
K
17 REPLIES 17
Dennis Handly
Acclaimed Contributor
Solution

Re: Time Zone TZ New Zealand

The first format will only work if you have an entry for NZST-12NZDT in /usr/lib/tztab.
The latter is only valid for years with that rule. Obviously, if there is a "new change", it isn't valid for making time queries for last year. Only by using tztab, can you create rules that are valid to the beginning of the epoch.
kate32
Frequent Advisor

Re: Time Zone TZ New Zealand

Thanks
So I will put on the file /etc/TIMEZONE
the TZ=NZST-12NZDT
Thanks again
Dennis Handly
Acclaimed Contributor

Re: Time Zone TZ New Zealand

>So I will put on the file /etc/TIMEZONE the TZ=NZST-12NZDT

Changing /etc/TIMEZONE alone won't work correctly unless you also change /usr/lib/tztab.

My tztab has an entry for NZST-12NZDT but it doesn't have your recent rule change.

Do you know how to translate "NZST-12NZDT,M9.5.0/02:00,M4.1.0/03:00" to the tztab format?

You haven't assigned any points yet. Please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
kate32
Frequent Advisor

Re: Time Zone TZ New Zealand

Hi

sorry for the delay.

Well it looks like complicated on HP system for the time zone. I didn;t realise that we do not change the value of TZ but have to modify the file /usr/lib/tztab instead.

On ibm aix for example you jsut modify the TZ variable to the good one...
So I was confused.

I have a question: If we install the latest patch of Timezone do this come with the new file version of /usr/lib/tztab or do I need to modify it ?

Thanks a lot in advance.

Cheers
Al.
James R. Ferguson
Acclaimed Contributor

Re: Time Zone TZ New Zealand

Hi:

> Well it looks like complicated on HP system for the time zone. I didn;t realise that we do not change the value of TZ but have to modify the file /usr/lib/tztab instead.

It isn't complicated on HP-UX at all. In fact, I find it simplier than Linux or AIX. You can set the TZ variable in your login '.profile' or set it system-wide in '/etc/TIMEZONE' (which in turn, will be sourced (read) by '/etc/profile' during login).

The *RULES* (definitions for a timezone) are what are held in '/usr/lib/tztab'. You can define your own if necessary simply by adding stanzas as documented in the manpages for 'tztab(4)'. Patches are usually released in plenty of time to accomodate world-wide TZ rule changes.

Moreoever, the HP-UX '/usr/lib/tztab' is an ASCII file that you edit directly. There is no "de-compilation" and "recompilation from a binary to an ASCII and from an ASCII to a binary format as in AIX.

> On ibm aix for example you jsut modify the TZ variable to the good one...So I was confused.

As you see from the above, this is really similar when you are choosing among established rules. In HP-UX, you modify either your '.profile' or '/etc/TIMEZONE'. In AIX, you modify '/etc/environment' (manually or with AIX's 'chtz').

> I have a question: If we install the latest patch of Timezone do this come with the new file version of /usr/lib/tztab or do I need to modify it ?

NO, the recent patches accomodate universal, standard definitions. To find the latest patch, search the ITRC Patch database with the keyword "tztab". For example, PHCO_36098 delivers the latest 'tztab' for 11.23.

When you modify a global setting or add a new ruleset, restart any long running processes like 'cron' and databases. THis allows them to re-cache the new rules. While a reboot is not strictly necessary it is the cleanest way to obtain consistent, system-wide process definition.

Please also see:

http://forums1.itrc.hp.com/service/forums/helptips.do?#28

Regards!

...JRF...
kate32
Frequent Advisor

Re: Time Zone TZ New Zealand

Hi,

Thank you very much for your reply.
Well I can close this post now as I have all the information and it is more clear now.

Thanks again.
cheers
K
kate32
Frequent Advisor

Re: Time Zone TZ New Zealand

Thanks for your help
Dennis Handly
Acclaimed Contributor

Re: Time Zone TZ New Zealand

>I didn't realise that we do not change the value of TZ but have to modify the file /usr/lib/tztab instead.

This is incorrect. You can do either (or both :-). While the setting of TZ is standard, it only works in the current year, as I said before, not previous. Using tztab(4) will work in all years.

>AIX for example you just modify the TZ variable

Yes, you can still do that, see TZ under environ(5).

>If we install the latest patch of Timezone do this come with the new file version of /usr/lib/tztab or do I need to modify it?

Looking at PHCO_36098 that JRF mentioned, I see no mention of New Zealand. When was this passed into law? In the US, we had almost 2.5 years to get ready.

>JRF: Patches are usually released in plenty of time to accommodate world-wide TZ rule changes.

I don't see one for New Zealand yet.
Dennis Handly
Acclaimed Contributor

Re: Time Zone TZ New Zealand

>I don't see one for New Zealand yet.

Ok, I looked when I got back to work. There seems to be patches in progress. CR JAGag42510
The defect will be fixed by patches:
PHCO_36823: 11.11
PHCO_36824: 11.23
PHCO_36825: 11.31