1833738 Members
2443 Online
110063 Solutions
New Discussion

Re: Changing Time Zone

 
Mihails Nikitins
Super Advisor

Changing Time Zone

Hello,

I should correct a wrong time zone setting on HP-UX box.
I'd like to know how HP-UX sets time zone when booting.
I know that /usr/lib/tztab describes all possible time zones. Does /etc/TIMEZONE store the current global setting? Unfortunately, I could not find a startup script referring to this file.

Is it possible to change current time zone without restarting the system?

Many thanks in advance for your comments!
KISS - Keep It Simple Stupid
4 REPLIES 4
Rita C Workman
Honored Contributor

Re: Changing Time Zone

I have found that changing the timezone using the set_parms command works best. And I recommend rebooting the box because if you don't all your cron jobs (if you have any) will still look to the old timezone.

Regards,
/rcw
John Bolene
Honored Contributor

Re: Changing Time Zone

A minor correction to Rita's answer, I have to use /etc/set_parms timezone and answer the questions.
A reboot is a real good thing to do after this and set_parms may instruct you to do this.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Kevin Wright
Honored Contributor

Re: Changing Time Zone

stop cron daemon
run set_params
restart cron /sbin/init.d/crond start
This will keep cron from kicking off jobs when you change the TZ
Mihails Nikitins
Super Advisor

Re: Changing Time Zone

Thanks a lot for your comments. I also found the answer to the second part of my question -
how it works.

Startup script /sbin/rc invokes another script /etc/rc.config that executes the third command file /etc/TIMEZONE.

/etc/TIMEZONE sets TZ variable using definitions from file /usr/lib/tztab

So /etc/TIMEZONE and /usr/lib/tztab appear to be the primary place to make modifications.
KISS - Keep It Simple Stupid