System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable timezone settings on HP-UX 10.20

 
SOLVED
Go to solution
xumingyong
Occasional Contributor

How to disable timezone settings on HP-UX 10.20

I located in China, we used B2600 workstation with HP-UX10.20, which was provided by ALSTOM, germany, we found that the clock jump twice each year, because of Daylight Saving Time.

After I checked the environment viarables, the TZ was set to Middle Europe time.

Who could tell me how to disable the clock-jumping, because there is no summer time in China.

Best wishes!
7 REPLIES
Pete Randall
Outstanding Contributor

Re: How to disable timezone settings on HP-UX 10.20

Either change the TZ variable setting to match a correct /usr/lib/tztab entry for your area or set the TZ variable to null.


Pete

Pete
Dennis Handly
Acclaimed Contributor

Re: How to disable timezone settings on HP-UX 10.20

>Pete: Either change the TZ variable setting to match a correct /usr/lib/tztab entry for your area

If there is no DST (or multiple zones) in China, xumingyong can invent his own timezone:
TZ=CHINA-8

>set the TZ variable to null.

This may set it to EST. Better to use GMT0?
xumingyong
Occasional Contributor

Re: How to disable timezone settings on HP-UX 10.20

Dennis Handlyï¼

you are right, I checked the manual, if TZ=null, then TZ was set to EST5DST by default.

Thanks.............
xumingyong
Occasional Contributor

Re: How to disable timezone settings on HP-UX 10.20

Now, my configuration is
--------------------
TZ=MET-1METDST
--------------------

In /usr/lib/tztab,
--------------------
...
# Middle European Time, Middle European Time Daylight Savings Time
MET-1METDST
0 3 25-31 3 1983-2038 0 METDST-2
0 2 24-30 9 1983-1995 0 MET-1
0 2 25-31 10 1996-2038 0 MET-1
...
----------------------

Could I simpely modify METDST-2 to METDST-1 to solve this question?

Bill Hassell
Honored Contributor
Solution

Re: How to disable timezone settings on HP-UX 10.20

It is best not to modify the tztab table. Simply change the file: /etc/TIMEZONE to read:

TZ=CHINA+8
export TZ

Or set it to the value that matches your location in China. The value +8 corresponds to Zhong Guo (Hong Kong). The TZ value is defined the man page: man environ

If you do not find your timezone in tztab, then define your own. The first word (CHINA) is anything you want to use and the + or - numbers represent the offset from UTC or Zulu time (also known as GMT). With just the name and the offset, there will be no Daylight Saving change on your machine. Note that you will have to change the system's time to match your local time *after* you make the TIMEZONE file change, and login again.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: How to disable timezone settings on HP-UX 10.20

>my configuration is: TZ=MET-1METDST

This gives you the time for Europe.

>Could I simply modify METDST-2 to METDST-1 to solve this question?

As Bill said, you do not modify tztab(4) except to possibly add new timezones.
In your case, you don't need to add a timezone since you don't have DST.

>Bill: Or set it to the value that matches your location in China.

It seems there is only one timezone.

>the + or - numbers represent the offset from UTC

These are the numbers when added to local time give UTC. The opposite of Windows.

>you will have to change the system's time to match your local time *after* you make the TIMEZONE file change

Is this to refresh the demons' ideas of local time?

Also, if TZ=MET-1METDST, it is very likely the system UTC time is broken.
What does this show?
date -u
It should be about 0240 on Dec 24.
Suraj K Sankari
Honored Contributor

Re: How to disable timezone settings on HP-UX 10.20

Hi,

If you feel you problem solved then please spend some more time and assign points to gurus.

http://forums11.itrc.hp.com/service/forums/helptips.do?#33

Plz go throug this link to konw how to assign points.

Suraj