1829743 Members
1301 Online
109992 Solutions
New Discussion

Time

 
SOLVED
Go to solution
Richard Horton
Advisor

Time

I have a HP9000 k370 that displays the correct time at the command prompt. However, I need to change the time zone from PDT to Eastern Time Zone. Can someone give me the command to type and the syntax for root to enter this command?
SCO veteran converting to HP UX
7 REPLIES 7
Andy Monks
Honored Contributor
Solution

Re: Time

Change the /etc/TIMEZONE file

You probably therefore want :-

EST5EST
Brian M. Fisher
Honored Contributor

Re: Time

You can also use /sbin/set_parms timezone

Brian
<*(((>< er
Perception IS Reality
James Odak
Valued Contributor

Re: Time

Also in SAM
under kernel config
and define parameters
but ya have to enter it in the number of min of off GMT
and also set the DST Param as well Yes or No for Daylight Savings Time

I was always told to rebuild the kernel when changing the timezone
is this true?
Andy Monks
Honored Contributor

Re: Time

I'd suggest NEVER changing the kernel versions of TZ. The one in /etc/TIMEZONE (which is the one set_parms changes), doesn't require a reboot. However applications 'might' get upset, depending on ho well they are written
Bill Hassell
Honored Contributor

Re: Time

/etc/TIMEZONE will have little effect on the system while it is running. This file (along with other config files in /etc) are sourced (executed in place) by /etc/rc.config, a script that starts all processes as the system boots. The inherited value of $TZ for all automatically-stated procsses will be unaffected if the TIMEZONE file is changed without a reboot.

The kernel parameters: timezone and dst should always be changed to match your local time. When $TZ is not inherited (special daemons or background processes), then exec calls to time routines will use the kernel parameters to select the time representation. Here is a quick review of time on HP-UX:

Time in Unix is always maintained as UTC or Zulu time. That's what the internal clock maintains. It makes perfect sense since this is the only universally recognized time reference. All other time zones very poor definitions of what is essentially an astronomic definition. Timezones follow political boundaries, not solar references.

And to make things worse, Daylight savings time is completely uncoordinated even in the U.S. and thus, Unix addresses the issue with the (in?)famous /usr/lib/tztab file. The good news is that you can edit it and create any timezone you like with any DST values you'd like, even rules that change from year to year.

Unix is unique in that any user can log in remotely from any location on earth, set the value of $TZ to the local timezone and from then on, all date and time references will be accurate for the local timezone. This includes daylight savings time. The Unix clock *never* skips forward or backward--only the interpretation changes based on the value on $TZ in the environment. This means that a database that uses a date stamp will obtain it's date stamp after being filtered by $TZ and the tztab rules. While the time will seem to jump, it is just the interpretation of Zulu/UTC time in that timezone.

The key is /etc/TIMEZONE where the current value of the tztab entry is kept for the host system. When the system starts, the script:

/etc/rc.config

is run and sources (executes locally) all the scripts in /etc/rc.config.d and also sources /etc/TIMEZONE. This sets all the ENV variables used by the startup scripts. Thus, when a network service such as inetd is started, it inherits the current values listed in /etc/TIMEZONE and so do the child processes of inetd.

One additional note: Some background processes may not inherit a $TZ value (for example, certain daemons, cronjobs, etc) and in this case, the kernel parameters timezone and dst need to be set for the local timezone. This is a less precise method as dst only has 6 formats but at least there will be a known timezone value for the date/time routines in these unique cases.


Bill Hassell, sysadmin
Dave Chamberlin
Trusted Contributor

Re: Time

While we are the subject of time - what is time syncronization? My k200 reports
on bootup that "time syncronization failed", but the system seems to have the
correct time anyway.
melvyn burnard
Honored Contributor

Re: Time

You may be using NTP or Network Time Protocol
Check to see whether you have it enabled to start in /etc/rc.config.d/netdaemons.
If so, it may be incorrectly set up or need redirecting to a working Time Server
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!