Operating System - HP-UX
1848089 Members
6987 Online
104022 Solutions
New Discussion

Turning off auto clock adjustment during daylight saving

 
SOLVED
Go to solution
Albert Goodman
Advisor

Turning off auto clock adjustment during daylight saving

Does anyone know how the system can be prevented from adjusting the clock automatically during daylight saving (HPUX 11i v1)? I was told there is a kernel parameter but I don't think that works. I understand we may be able to fudge the tztab but is there a cleaner way?
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: Turning off auto clock adjustment during daylight saving

Time is always kept in UTC time on the HP-UX boxes. The actual clock is never adjusted. It is only the displayed time that is adjusted based on the timezone you select and the appropriate tztab entries.

Rajeev  Shukla
Honored Contributor

Re: Turning off auto clock adjustment during daylight saving

Yes there is a way by adjusting your time zone i.e. /etc/TIMEZONE to proper offset and removing DT from the end...say your are in sydney where the time zone is EST-10EDT, now if you dont want the clock to adjust in daylight your entry in /etc/TIMEZONE file should be only EST-10

Rajeev
Bill Hassell
Honored Contributor

Re: Turning off auto clock adjustment during daylight saving

The details are in: man environ where you can create your own timezone if you want. As mentioned, set the TZ value (automatically set at login with the /etc/TIMZONE script) to just timezone name and offset (like EST5), but no trailing text (like EDT).


Bill Hassell, sysadmin
BUPA IS
Respected Contributor
Solution

Re: Turning off auto clock adjustment during daylight saving


if you wanted to record the old settings for historical calculation consistency . you could add the entries matching the old settings with whatever dates it had in the list. just fix the year and start dates something like this

EST-10
0 3 25-31 10 1971-1999 0 EDT-11
0 3 27 8 2000 0-6 EDT-11
0 3 25-31 10 2001-2005 0 EDT-11
0 1 27 2 1972 0-6 EST-10
0 1 1-7 3 1973-1985 0 EST-10
0 1 15-21 3 1986 0 EST-10
0 1 1-7 3 1987-1995 0 EST-10
0 2 25-31 3 1996-2005 0 EST-10
0 2 25-31 3 2006-2038 0 EST-10 # fix the date here from when you start the fixed time zone .

you can set timezone in the kernel to -600 (minutes) (10 hours) this will set the time zone for the kernel and boot date displays set dst in the kernel to 0 to turn off the dst adjustment algorithm . (see sam help) fix /etc/TIMEZONE and or profiles to EST-10
Save your own copy of this tztab because HP send out patches for it when countries change their laws and you will have to put it back.

mike
Help is out there always!!!!!
Albert Goodman
Advisor

Re: Turning off auto clock adjustment during daylight saving

Hi Mike,

Could you please elaborate on "... boot date displays set dst in the kernel to 0 to turn off the dst adjustment algorithm ." ?

Thanks,
BUPA IS
Respected Contributor

Re: Turning off auto clock adjustment during daylight saving

Albert,
Sorry, I missed a full stop after "displays ." , and I should have said "Then set dst to 0 in the kernel" .
When the system boots the first message that is displayed giving the date and time of the boot comes directly from the kernel. Typically if you do not set the timezone in your kernel you get it displayed as Pacific time +420 mins (7 hours behind - west of - GMT ). Some dmesg time stamps use this as well. Once the system is running then tztab and the shells take over the display of the time .
I hope this is clearer .
Mike
Help is out there always!!!!!
Albert Goodman
Advisor

Re: Turning off auto clock adjustment during daylight saving

Thank you all for your kind and timely responses. Your insights/suggestions are much appreciated.

Thanks Mike for clarifying the point.