Operating System - HP-UX
1820332 Members
2932 Online
109623 Solutions
New Discussion юеВ

new Daylight Savings Time shift

 
SOLVED
Go to solution
Marty Metras
Super Advisor

new Daylight Savings Time shift

Good morning,
Is there a patch for the clock or a setting file to change for the new Daylight Savings Time shift for next year?
Remember this?
"In August of 2005, the United States Congress passed an energy bill, which included extending Daylight Saving Time by four weeks. Beginning in 2007, DST will start the second Sunday of March and end on the first Sunday of November. Automated time & attendance solutions leveraging data collection devices, including those from Galaxy Technologies, will be impacted by these time changes. "

Marty
The only thing that always remain the same are the changes.
27 REPLIES 27
James R. Ferguson
Acclaimed Contributor
Solution

Re: new Daylight Savings Time shift

Hi Marty:

Yes, there are indeed patches covering the new Daylight Saving rules.

Search the ITRC Patch Database using the OS version (11.0, 11.11 or 11.23) and the keyword 'tztab'. The patch provides an updated '/usr/lib/tztab'.

Installation does not require a reboot, but some time before the next daylight transition, stop and restart (at least) the 'cron' daemon and any databases or other long-lived processes. A reboot is ideal. The idea is to give processes that have cached the old rules a chance to read the updated 'tztab' and cache the new rules.

Since 10.20 is out of support (and very soon 11.0) there is no patch for it. However, you can simply copy an 11x '/usr/lib/tztab' to a 10.20 system. The only "loss" is that the 10.20 Installed Product Database (as seen by 'swlist') will not show the patch trace.

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: new Daylight Savings Time shift

Marty,

The patch for 11i is PHCO_34668. If you need other versions, they should be listed in PHCO_34668.


Pete

Pete
Marty Metras
Super Advisor

Re: new Daylight Savings Time shift

Thanks Guys!

Marty
The only thing that always remain the same are the changes.
Ken Martin_3
Regular Advisor

Re: new Daylight Savings Time shift


Since for example PHCO_34673 contains the tztab file and it is for HP/UX 11 swinstall won't let you install in under 10.20.

How do you the the /usr/lib/tztab file out of PHCO_34673 if there is a way? Or, can you force swinstall to override and install the file anyway?

Thanks...
Christian Tremblay
Trusted Contributor

Re: new Daylight Savings Time shift

Just copy the tztab file from a 11.00 11.11 or 11.23 system that has already been patched to the 10.20 system.

Chris
Ken Martin_3
Regular Advisor

Re: new Daylight Savings Time shift

I don't have an 11 system to copy from?

I currently have only 10.20 on a legacy box.



Marty Metras
Super Advisor

Re: new Daylight Savings Time shift

I have just upgraded a HPUX 11.11 server and I have the new tztab file I could attach.
Is all I have to do one the 11.0 server is put in the new tztab file and reboot before March 26th?

I will attach the file on the nezt posting because I am rebooting now.

What about the linux servers?
Marty
The only thing that always remain the same are the changes.
James R. Ferguson
Acclaimed Contributor

Re: new Daylight Savings Time shift

Hi Marty (and Ken):

Here's the procedure for extracting the '/usr/lib/tztab' from an 11.x patch for use on HP-UX 10.20:

Assume that we want to extract the '/usr/lib/tztab' configuration file from the 11.11 patch PHCO_34668.

1. Fetch the appropriate patch from the ITRC Patch Database. It is convenient to use a web browser and "save as" to a PC directory.

2. FTP the downloaded patch from the PC to the UNIX server (in ASCII mode), placing the patch in the '/tmp' directory (e.g. as '/tmp/PHCO_34668.htm').

3. Snip the patch file header to the "cut here" line.

4. If necessary, fix the UNIX shell redirection operators in the HTML file:

# perl -pi.old -e 's/<//g;s/&/&/g' /tmp/PHCO_34668.htm

5. Un-share the patch, creating a "*.text" and a "*.depot" file:

# sh /tmp/PHCO_34668.htm

6. Un-tar the resulting depot file:

# tar -xvf /tmp/PHCO_34668.depot

7. Change to the directory that is the name of the patch. For instance:

# cd /tmp/PHCO_34668

Within this directory will be subdirectories and the configuration file sought. In this example:

/tmp/PHCO_34668/UX-CORE/usr/newconfig/usr/lib/tztab

8. The file of interest ('tztab') is in compressed form. Thus, rename it and decompress it, thusly:

# mv tztab tztab.gz
# gzip -d tztab.gz

The resulting file (here, 'tztab') is the desired configuration file extracted from its patch wrappings.

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: new Daylight Savings Time shift

Hi (again) Marty:

I see you had two other questions:

> Is all I have to do one the 11.0 server is put in the new tztab file and reboot before March 26th?

Yes, you can port the 'tztab' extracted from 11.11 to 11.0 or 10.20. Re-read my original response to this thread. A reboot sometime before the Spring will cause all processes started to fetch (and cache) the new 'tztab' rules.

> What about the linux servers?

Linux handles its configuration a bit differently and patches for your distribution should be available.

Regards!

...JRF...
Marty Metras
Super Advisor

Re: new Daylight Savings Time shift

thanks James,
I thought is what you were telling us.

I have attacked a copy for Ken how has 10.20
the tztab attached was created with the patch on our 11.11 server.
Marty
The only thing that always remain the same are the changes.
Ken Martin_3
Regular Advisor

Re: new Daylight Savings Time shift

Hi Marty,

Sorry, the attachment is empty.

Zero bytes?

Ken
Bill Hassell
Honored Contributor

Re: new Daylight Savings Time shift

tztab is the same format for many revs of HP-UX so this 11.00 version should work fine. I have attached it to this post. If you search the file for 2006 and 2007, you'll see the way the change is implemented. Just store this file in /usr/lib. Be sure to reboot sometime in the next month or so to update things. Note: depending on how your 10.20 system is patched, you may get a core dump with date or other programs. This is due to a very old version of the libraries that cannot handle the # character in Indiana timezones. You can either comment those lines (assuming you're not using them) or just remove the # character, or load all the latest (2001) patches.


Bill Hassell, sysadmin
Marty Metras
Super Advisor

Re: new Daylight Savings Time shift

Sorry Ken,
I'll try again.
Marty
The only thing that always remain the same are the changes.
Marty Metras
Super Advisor

Re: new Daylight Savings Time shift

Ok what is going on here.
Why will it not post this file?

Re-attaching as 'tztab.txt'
Marty
The only thing that always remain the same are the changes.
Ken Martin_3
Regular Advisor

Re: new Daylight Savings Time shift


Well I'm confused!

All the attachments are empty.

Ken
Bill Hassell
Honored Contributor

Re: new Daylight Savings Time shift

It looks like attachments are failing in the forums. Here is a list of just the U.S. timezones which you can copy and replace the same section in your /usr/lib/tztab:

# Modified to handle US Daylight Saving Time(DST) changes
# due to go into effect in 2007. Modifications is done
# on following time zones : PST8PDT, EST5EDT, CST6CDT
# and MST7MDT.

# US DST changes for PST8PDT.

# Pacific Standard Time, Pacific Daylight Time
PST8PDT
0 3 24-30 4 1970-1973 0 PDT7
0 3 6 1 1974 0-6 PDT7
0 3 22-28 2 1975 0 PDT7
0 3 24-30 4 1976-1986 0 PDT7
0 3 1-7 4 1987-2006 0 PDT7
0 3 8-14 3 2007-2038 0 PDT7
0 1 25-31 10 1970-1973 0 PST8
0 1 24-30 11 1974 0 PST8
0 1 25-31 10 1975-2006 0 PST8
0 1 1-7 11 2007-2038 0 PST8

# US DST changes for EST5EDT.

# Eastern Standard Time, Eastern Daylight Time
EST5EDT
0 3 24-30 4 1970-1973 0 EDT4
0 3 6 1 1974 0-6 EDT4
0 3 22-28 2 1975 0 EDT4
0 3 24-30 4 1976-1986 0 EDT4
0 3 1-7 4 1987-2006 0 EDT4
0 3 8-14 3 2007-2038 0 EDT4
0 1 25-31 10 1970-1973 0 EST5
0 1 24-30 11 1974 0 EST5
0 1 25-31 10 1975-2006 0 EST5
0 1 1-7 11 2007-2038 0 EST5

# US DST changes for CST6CDT.

# Central Standard Time, Central Daylight Time
CST6CDT
0 3 24-30 4 1970-1973 0 CDT5
0 3 6 1 1974 0-6 CDT5
0 3 22-28 2 1975 0 CDT5
0 3 24-30 4 1976-1986 0 CDT5
0 3 1-7 4 1987-2006 0 CDT5
0 3 8-14 3 2007-2038 0 CDT5
0 1 25-31 10 1970-1973 0 CST6
0 1 24-30 11 1974 0 CST6
0 1 25-31 10 1975-2006 0 CST6
0 1 1-7 11 2007-2038 0 CST6

# US DST changes for MST7MDT.

# Mountain Standard Time, Mountain Daylight Time
MST7MDT
0 3 24-30 4 1970-1973 0 MDT6
0 3 6 1 1974 0-6 MDT6
0 3 22-28 2 1975 0 MDT6
0 3 24-30 4 1976-1986 0 MDT6
0 3 1-7 4 1987-2006 0 MDT6
0 3 8-14 3 2007-2038 0 MDT6
0 1 25-31 10 1970-1973 0 MST7
0 1 24-30 11 1974 0 MST7
0 1 25-31 10 1975-2006 0 MST7
0 1 1-7 11 2007-2038 0 MST7

# The following entry is added, as Indiana
# will support Daylight Saving Time (DST)
# from 2006 onwards. Indiana will have two
# Time zones EST5EDT#Indiana and CST6CDT#Indiana,
# for provinces within Indiana supporting
# Eastern or Central Time Zone respectively.

# Eastern Standard Time, Eastern Daylight Time(US: Indiana)
EST5EDT#Indiana
0 3 24-30 4 1970-1973 0 EST5
0 3 6 1 1974 0-6 EST5
0 3 22-28 2 1975 0 EST5
0 3 24-30 4 1976-1986 0 EST5
0 3 1-7 4 1987-2005 0 EST5
0 3 1-7 4 2006 0 EDT#Indiana4
0 3 8-14 3 2007-2038 0 EDT#Indiana4
0 1 25-31 10 1970-1973 0 EST5
0 1 24-30 11 1974 0 EST5
0 1 25-31 10 1975-2005 0 EST5
0 1 25-31 10 2006 0 EST5
0 1 1-7 11 2007-2038 0 EST5

# Central Standard Time, Central Daylight Time(US: Indiana)
CST6CDT#Indiana
0 3 24-30 4 1970-1973 0 CST6
0 3 6 1 1974 0-6 CST6
0 3 22-28 2 1975 0 CST6
0 3 24-30 4 1976-1986 0 CST6
0 3 1-7 4 1987-2005 0 CST6
0 3 1-7 4 2006 0 CDT#Indiana5
0 3 8-14 3 2007-2038 0 CDT#Indiana5
0 1 25-31 10 1970-1973 0 CST6
0 1 24-30 11 1974 0 CST6
0 1 25-31 10 1975-2005 0 CST6
0 1 25-31 10 2006 0 CST6
0 1 1-7 11 2007-2038 0 CST6


Bill Hassell, sysadmin
Ken Martin_3
Regular Advisor

Re: new Daylight Savings Time shift

Bill, Marty,

The above worked fine.

Not needing Indiana or core dumps I commented out the Indiana portions and tr -d "\015" to remove unneeded ^M's in file.

I renamed file /usr/lib/tztab to /usr/lib/tztab.2006

Copied the new file to /usr/lib/tztab then chown / chgrp to bin and chmod to 666.

Then ran /sbin/set_parms timezone to set machine. Rebooted via shutdown -r 0

Worked fine. Thanks.

Ken Martin_3
Regular Advisor

Re: new Daylight Savings Time shift


Error in reply:

Copied the new file to /usr/lib/tztab then chown / chgrp to bin and chmod to 666.

Should have read:

Copied the new file to /usr/lib/tztab then chown / chgrp to bin and chmod to 444.

Ken
Bill Hassell
Honored Contributor

Re: new Daylight Savings Time shift

Just a note about ^M in files. This is very, a very common problem between PCs and Unix systems. The text in the posting was fine but you probably stored it on your PC, then used ftp to copy it to HP-UX. The error was that you forgot to type the ASCII command (or select ASCII in a GUI-based ftp program). You should always select ASCII when using ftp and text files. Without the ASCII translator, the file is sent in BINARY mode and is ONLY useful between like systems ie, PC to PC, or for truly binary files such as raw data.

In case you missed this very useful daylight saving tester, here is a copy. Note that you wil need Perl 5 on your system to run it (10.20 only has obsolete Perl 4 by default). You can find the change dates for any year using the dst.pl script.


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: new Daylight Savings Time shift

Well, the Forums are still not handling uploads correctly. Here is a link where Clay has the dst.pl posted:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1083531

Run it like this:

dst.pl -y 2006
dst.pl -y 2007


Bill Hassell, sysadmin
Ken Martin_3
Regular Advisor

Re: new Daylight Savings Time shift

Bill,

Thanks for the heads up on the ftp copy.

I always forget about using ascii.

It just came up yesterday on a different issue.

binary I remember, ascii I forget.

Sign of old age?

Thanks


Re: new Daylight Savings Time shift

Bill,
You by chance have an output from what it's supposed to look like and what it looks like if it's wrong? If not I'm getting ready to run the script on a couple of boxes I know has the patch and one that doesn't.

Michael
James R. Ferguson
Acclaimed Contributor

Re: new Daylight Savings Time shift

Hi Marty:

A sample of Clay's script's output can be seen in this thread. A correctly patched system will show the transition points for March and November as you have noted.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=850635

Regards!

...JRF...
Christian Tremblay
Trusted Contributor

Re: new Daylight Savings Time shift

Running Clay's script will generate two lines of output stating at which dates the DST change will occur.

# perl timechg.pl -y 2007
Sun Apr 01 01:59:59 EST 2007 --> Sun Apr 01 03:00:00 EDT 2007
Sun Oct 28 01:59:59 EDT 2007 --> Sun Oct 28 01:00:00 EST 2007

install patch.....

# perl timechg.pl -y 2007
Sun Mar 11 01:59:59 EST 2007 --> Sun Mar 11 03:00:00 EDT 2007
Sun Nov 04 01:59:59 EDT 2007 --> Sun Nov 04 01:00:00 EST 2007