1752796 Members
5901 Online
108789 Solutions
New Discussion юеВ

Re: Timezone settings

 
SOLVED
Go to solution
Ferdi Castro
Advisor

Timezone settings

Hi All,
I would like to set the timezone for my HP server here in Tehran, Iran>In tehran its UTC/GMT +3:30.

But its not in the tztab. is it ok to edit it if not... How can I change it. thanks.
and have a correct timezone here

Thanks, Ferdi
3 REPLIES 3
Sp4admin
Trusted Contributor
Solution

Re: Timezone settings

Hi Ferdi,

you can set the timezone using "set_parms timezone". This will let you select the correct timezone.

Hope this helps,
SP,
A. Clay Stephenson
Acclaimed Contributor

Re: Timezone settings

It is perfectly legal to define TZ and put it in /etc/TIMEZONE. Man 5 environ for details about the TZ format. You only need an entry in /usr/lib/tztab if your country has something similer to Daylight Saving Time or Summer Time otherwise, no entry is needed.

If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Timezone settings

The set_parms command won't help here because it only knows a few common timezone values. In fact, you don't even need to edit tztab although this would be a more conventional location. The man page for environ describes how you can create your own timezone. The file is called /etc/TIMEZONE and if you edit this file to read:

TZ=TEH-3:30
export TZ

Note that I just made up the timezone name TEH (per man environ). If you don't observe daylight saving, this is the only change you need. Each time you login, you'll have your local time. Note that depending on what your current server is set to, you may need to change the HP-UX clock (which is GMT/UTC), then reboot.


Bill Hassell, sysadmin