Operating System - HP-UX
1832373 Members
2980 Online
110041 Solutions
New Discussion

New timezone entries in tztab not reflected in set_params

 
SOLVED
Go to solution
Harold Rodgers
New Member

New timezone entries in tztab not reflected in set_params

Most of Indiana is now moving to a new timezone. There is a patch that has updated the tztab file with an entry EST5EDT#Indiana. But when issuing a set_params timezone, the new timezone is not listed as a possibility. Should the file /etc/TIMEZONE be edited and the line TZ=EST5 be changed to EST5EDT#Indiana?
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: New timezone entries in tztab not reflected in set_params

Shalom Harold,

I think you should run swverify to make sure the patch is installed and not corrupt.

swverify

Then you should consider editing the TIMEZONE file if it can be edited. Don't touch it if its binary, only if its text.

file /etc/TIMEZONE

They changed the clocks here on Friday morning at 2 a.m. Who ever heard of such a thing?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor
Solution

Re: New timezone entries in tztab not reflected in set_params

Hi Harold:

Once you have a patched '/usr/lib/tztab',
simply edit '/etc/TIMEZONE' and put your timezone therein. This is what 'set_parms' is going to do anyway.

When the modification has been made to the '/usr/lib/tztab' any new process started will fall under the new "rules". A restart of 'cron' would cover cron tasks. New logins would execute 'login()' so the processes spawned by those would also abide by the new time changes. A reboot of the server sometime before the mandated time change would then align everything --- things that are running and things that are later scheduled to run.

Regards!

...JRF...
Harold Rodgers
New Member

Re: New timezone entries in tztab not reflected in set_params

Thanks for the quick response Steve & James. I have now run swverify PHCO_34668 and it was installed successfully. I have now edited /etc/TIMEZONE and have logged in and see that my environment variable TZ is now EST5EDT#Indiana. I plan on doing a reboot of the system Saturday prior to the time change. The real proof will be after 2am Sunday morning. But from your responses, I feel that it's going to go okay.

Bill Hassell
Honored Contributor

Re: New timezone entries in tztab not reflected in set_params

The set_parms code was probably not modified as it is more complicated to change than a new timezone. Clay has posted a nice Perl script that when run, will tell you exactly when (or if) Daylight Saving will have an effect. Here's a link:

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

Clay's script locates and displays the Daylight Saving points exactly as the system libraries would. The set_parms code is really for getting started with networking and setting up root's password. All the rules for timezones are kept in /usr/lib/tztab and a good discussion on how to create your own customized timezone are found in: man environ

As mentioned in the link, time never changes in HP-UX -- it is always GMT (more accurately, UTC or Zulu time) so the $TZ value is used by the system time libraries to translate the appearance of time. The beauty of this system is that users can login from all over the world, set the TZ value to match their local timezone and they will see a system that matches their local time. Most databases will also handle time correctly using the standard library routines.


Bill Hassell, sysadmin
Harold Rodgers
New Member

Re: New timezone entries in tztab not reflected in set_params

Thanks to all that provided information. I found that each one of your responses had information that was helpful to me. With your responses, I was able to successfully weather the timezone change.