Operating System - HP-UX
1833875 Members
1426 Online
110063 Solutions
New Discussion

Re: NEED TO RUN GMT ALL YEAR

 
SOLVED
Go to solution
Simon P White
Advisor

NEED TO RUN GMT ALL YEAR

We have a requirement to run GMT all year round. How do I achieve this? We are running HP-UX 11i
7 REPLIES 7
Leif Halvarsson_2
Honored Contributor

Re: NEED TO RUN GMT ALL YEAR

Hi,
Try with:
/sbin/set_parms timezone
RAC_1
Honored Contributor

Re: NEED TO RUN GMT ALL YEAR

/etc/TIMEZONE is the time zone file. Check that or else do set_params timezone
There is no substitute to HARDWORK
Chris Wilshaw
Honored Contributor

Re: NEED TO RUN GMT ALL YEAR

We have the same situation (carrying out manual time changes twice a year).

We've found that the easiest way is to change /usr/lib/tztab so that the GMT section reads as

# Greenwich Mean Time, British Summer Time
GMT0BST
0 3 25-31 3 1983-1984 0 GMT0
0 3 23-29 3 1985-1990 0 GMT0
0 3 25-31 3 1991-1995 0 GMT0
0 2 25-31 3 1996-2038 0 GMT0
0 1 25-31 10 1983-1985 0 GMT0
0 1 23-29 10 1986-1994 0 GMT0
0 1 18-24 10 1995 0 GMT0
0 1 25-31 10 1996-2038 0 GMT0
Bill Hassell
Honored Contributor

Re: NEED TO RUN GMT ALL YEAR

HP-UX only runs GMT. It's the value of $TZ that controls how the time appears to users and programs. When a user logs in, the TZ value is set in /etc/profile or /etc/csh.login by assigning it using /etc/TIMEZONE but certainly can be customized for each user. In HP-UX, any user can login from any location in the world and see their local time by simply setting the TZ variable.

That is why changing the time manually is neither required nor desirable. If you chage the time manually without a reboot, it is possible for applications to become quite confused and cron jobs to not run for that day. You can create a custom entry in /usr/lib/tztab to allow time of day values to follow any customized rules for your locale. Check the man page for tztab.


Bill Hassell, sysadmin
Simon P White
Advisor

Re: NEED TO RUN GMT ALL YEAR

Is is safe to edit the tztab file? Could this file be replaced by subsequent patches or upgrades?
harry d brown jr
Honored Contributor

Re: NEED TO RUN GMT ALL YEAR

Simon, editing the file is the only way to change it.

live free or die
harry
Live Free or Die
Bill Hassell
Honored Contributor
Solution

Re: NEED TO RUN GMT ALL YEAR

Yes, you can edit the file. Keep in mind that this file and the value of $TZ only translates the internal GMT time for programs like date and system calls to return the time of day. If you need a custom timezone value, you can create one in tztab.

Yes, a subsequent patch may replace this file, so start by looking at the choices that already exist. You may find that a match already exists. Read the comments in the man page for tztab as well as the file itself. If you do make changes, you'll need to check that file after each major patch rollout.


Bill Hassell, sysadmin