Operating System - HP-UX
1819803 Members
3197 Online
109607 Solutions
New Discussion юеВ

Changing timezone for DST

 
Khoso
Occasional Advisor

Changing timezone for DST

I wanted to change timezone on
HP-UX B.11.23 U ia64. Since there is no available patch so, I modified following in tztab

# Pacific Standard Time, Pacific Daylight Time (for Malaysia or Singapore)
#

PST9PDT
0 0 9 6 2008-2008 1 PDT9
0 0 10 6 2008-2038 1 PST8

But it did not come into effect on particular date & time. Can someone help to understand how do the changes made in tztab file come into effect. Does sytem require reboot?
7 REPLIES 7
Alan Casey
Trusted Contributor

Re: Changing timezone for DST

The HP-UX $TZ precedences are (see patch PHCO_34275 special instructions for better understanding):

1) if the environment variable TZ is present, it takes the
precedence.
2) if TZ is not present, then the value contained in
/etc/default/tz is used for default.
3) if /etc/default/tz is not set, then the default value is
equivalent to EST5EDT (Eastern Standard Time) of US.
Kenan Erdey
Honored Contributor

Re: Changing timezone for DST

Hi,

can you look at which timezone you are in
with date command ?



Computers have lots of memory but no imagination
Rasheed Tamton
Honored Contributor

Re: Changing timezone for DST

cat /etc/TIMEZONE
echo $TZ
grep TZ /etc/profile

The TZ variable is exported from the profile

If you want to change the date/time, then you have to use the date command. But if you have application/database running which depends on the time stamp, then it is not recommended to use date command while the db/apps running. You need to stop those before you change the time.
Khoso
Occasional Advisor

Re: Changing timezone for DST

date command is showing SST, so is the TZ=SST-8

Infact I tried SST too in the tztab.
Dennis Handly
Acclaimed Contributor

Re: Changing timezone for DST

This is not a valid timezone, PST9PDT. For one reason PST/PDT is trademarked for PST8PDT for the Pacific coast of the US. :-)
And the second, 9 is off the west coast in the water, or in Alaska. :-)

Perhaps you meant PST-9PDT? There is PST-8PDT in:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1217628

Another problem you are violating the undocumented restrictions in tztab.
If you set the day of week to 1 (Monday), you MUST have a date range of EXACTLY 7 days, instead of either 9 or 10.
Rasheed Tamton
Honored Contributor

Re: Changing timezone for DST

The best way for you to do a set_parms timezone but it needs a reboot. It would give you the menu for you to choose the correct ones and avoid confusion.

set_parms timezone

It allows you to select a timezone based on your country of location.Also it allows you to set a user-supplied timezone.
Dennis Handly
Acclaimed Contributor

Re: Changing timezone for DST

Or if you insist on using Jun 9 and Jun 10, you must set the day of week range to "0-6".

In any case, if you want to test this, you should use Clay's dst.pl script:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1234321