Operating System - HP-UX
1832973 Members
2694 Online
110048 Solutions
New Discussion

Re: Change time for EST to PDT

 
joe_91
Super Advisor

Change time for EST to PDT

I need to change on a server running 11.11. How wd i do it? Should i have downtime for this. It is production.

Thanks

Joe
7 REPLIES 7
IT_2007
Honored Contributor

Re: Change time for EST to PDT

You can set it using

set_parms timezone

Allows the user to select a timezone based on the country of location. Also allows setting a user-supplied timezone. The system will need to be rebooted for a change to take effect.
A. Clay Stephenson
Acclaimed Contributor

Re: Change time for EST to PDT

It amounts to nothing more than changing /etc/TIMEZONE so you can do it anytime BUT there are consequences. Currently running processes will continue to use their original TZ values --- including the cron daemon. Well-written applications will have their timezone displayed or will actually store any timestamps in some sort of absolute time and display it based upon TZ. Less than well-written applications will simply display and store local timestamps so it that case the smart approach is to shutdown and wait until PDT "catches up" with EST and startup then. This approach will prevent
transaction 100, for example, from occurring before transaction 99. Some thought also needs to be given to your existing cron entries. Will they need to be adjusted for the new time? Will you miss any cron jobs during your changeover?

In short, you've got lots of homework to do before you know the answer to YOUR question.


No one can really answer this question for you with anything other than "it depends" because it depends upon your applications and environment.
If it ain't broke, I can fix that.
IT_2007
Honored Contributor

Re: Change time for EST to PDT

Since it is in production, it is always recommended to do during Maint. mode.
Sp4admin
Trusted Contributor

Re: Change time for EST to PDT

Hi Joe,


You can do a "set_parms timezone" and just answer the question it ask you. Like what time zone.:-)

sp,
Sean Dale
Trusted Contributor

Re: Change time for EST to PDT

You can also change it using SAM.

Kernel Configurarion -> Configurable Parameters -> Timezone

Specify the time delay from Coordinated Universal Time west to the local time zone.
Acceptable Values:

Minimum
-720
Maximum
720
Default
420

http://docs.hp.com/en/939/KCParms/KCparam.TimeZone.html
Live life everyday
A. Clay Stephenson
Acclaimed Contributor

Re: Change time for EST to PDT

The kernel value only comes into play if TZ is not set and knows nothing about Daylight Saving Time. The question here is not so much how to set TZ; that's trivially easy; but rather when to set it and what will be the side effects.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Change time for EST to PDT

First: why do you need to change the timezone? Is it being moved across the country from Eastern to Pacific timezone? Or is it because remote users are in a different timezone?

If it is being moved, just edit the file /etc/TIMEZONE and change EST5EDT to PST8PDT. No need to run set_parms.

HOWEVER: If it is because there are remote users, DON'T change the time. HP-UX keeps universal time (GMT, UTC, Zulu, etc) and will display and accept *ANY* timezone anywhere. If your system is in New York, and users in California aer using it, those users make one change to their login .profile:

export TZ=PST8PDT

or whatever timezone the users are in. Now I see you said: "EST to PDT". This calls into question just what time your server is using. If your current setting in /etc/TIMEZONE is truly EST5, then your computer time may be off by an hour. The reason is that if you set the system time with TZ=EST5 when Daylight Saving was in effect, the computer's time is off by one hour. To verify this, display the computer's time with:

date -u

The time should be 6 hours later for date -u (UTC time). The /etc/TIMEZONE file must have the full standard and daylight saving names: EST5EDT which matches the definition in /usrlib/tztab.

To see how the date (and therefore, timestamps for files, etc) are affected by TZ, try these commands:


TZ=CST6CDT date
TZ=MST7MDT date
TZ=PST8PDT date

and to see what happens if EDT is missing:

TZ=EST5 date
TZ=EST5EDT date

So, no need to change the computer time at all. Just adjust TZ for remote users.



Bill Hassell, sysadmin