Operating System - HP-UX
1755694 Members
3610 Online
108837 Solutions
New Discussion юеВ

Re: Timezone shift in minutes

 
SOLVED
Go to solution
EML
Advisor

Timezone shift in minutes

Hi,

How do I set my timezone, say -8:23 GMT, in HP-UX 11.0 without rebooting? Can I just edit /etc/TIMEZONE and relogin for it to take effect? And how do I specify the TZ = XXX if its not in the /usr/lib/tztab, like my example?

BR,
Edmund
7 REPLIES 7
Craig Rants
Honored Contributor

Re: Timezone shift in minutes

Try using set_parms timezone

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
harry d brown jr
Honored Contributor

Re: Timezone shift in minutes

Edmund,

see todays thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x15928cc5e03fd6118fff0090279cd0f9,00.html

You want -8:23GMT? You aren't using the time zone to adjust the clock are you?

live free or die
harry
Live Free or Die
EML
Advisor

Re: Timezone shift in minutes

Hi Craig,

Will it not reboot the system?

BR,
Edmund
EML
Advisor

Re: Timezone shift in minutes

Hi Harry,

I want to test an application how it logs events when the timezone shift include minutes. So I'm trying to find a more flexible way of adjusting to several timezones(+HH:MM and -HH:MM GMT) without rebooting the system because it takes a of precious time.

BR,
Edmund
Craig Rants
Honored Contributor

Re: Timezone shift in minutes

Don't think so, the only time the system needs to reboot the system is when kernel changes are made.

C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Trond Haugen
Honored Contributor
Solution

Re: Timezone shift in minutes

To change the timezone (TZ) for a shell you can just change the shell variable;
$ date
Wed Mar 27 15:47:21 MET 2002
$ echo $TZ
MET-1METDST
$ TZ=GMT
$ date
Wed Mar 27 14:47:36 GMT 2002

This TZ will be inherrited by child processes:
$ sh
$ date
Wed Mar 27 14:48:09 GMT 2002

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
EML
Advisor

Re: Timezone shift in minutes

Hi Trond,

And its also possible to specify the TZ that is not on the tztab, like:

TZ=-4:38GMT
or
TZ=+7:57GMT

Thank you very much to all.

BR,
Edmund