Summary: Problems with daylight savings change

Kevin Beauchamp <[email protected]>
Newsgroups gmane.os.tru64.managers
Organization University of Alberta
Message-ID <[email protected]>
On Mon, 29 Jan 2007, I wrote:

> Regarding the upcoming changes to the beginning and ending dates of daylight
> savings time, we've looked at the patches HP released and seen that they
> start at version 4.0E: since we're still on 4.0D it doesn't look like that 
> is an option for us.
>
> I downloaded the new timezone data file tzdata2007a.tar.gz from
> ftp://elsie.nci.hi.gov/pub and tried to compile it with our old version of
> zic, but it failed.
>
> I then tried compiling both the new timezone code and data, but the new code
> will not compile on our system with the default Makefile.
>
> Has anyone still on a version of Digital Unix too old to use the patches 
> found a way to upgrade their timezone information?

Thanks to all who replied:

        "Stacks, David W" <[email protected]>
        James Sainsbury <[email protected]>
        Franz Fischer <[email protected]>

The solution was to use the version of zic we already had and modify our 
existing timezone data. The HP DST file (contents quoted below: thanks David) 
helped.

Two minor issues: 

1) our zdump choked on the leading colon when specifying the timezone but 
worked when it was omitted. 
2) "zic backward" failed.

Note: We have not tried rolling the clock ahead to test how the system acts 
during the new daylight savings period as yet. Caveat emptor.

Thanks again.

Contents of the HP DST file:

__________

The following steps will implement the 2007 changes to U.S. Daylight Saving 
Time (DST) rules on Tru64 UNIX version 5 systems for which an Early Release 
Patch (ERP) is not available.  An ERP to implement these changes is available 
for V5.1A with patch kit 6, for V5.1B with patch kit 4 (aka V5.1B-2), and 
V5.1B with patch kit 5 (aka V5.1B-3).  For all other V5 version/patch kit 
combinations, the changes must be implemented manually.  This is a reasonably 
quick and straightforward process and does not require a system reboot.


Step 1: For comparison purposes, display the times for DST changes for 2006 
and 2007 under the current rules.  This can be done using any of the United 
States time zones; for this example, we will use America/New_York.  To verify 
the time zone in use on your system, display the symbolic link 
/etc/zoneinfo/localtime:

# ls -l /etc/zoneinfo/localtime
lrwxrwxrwx   1 root     system        18 Feb  8  2004 /etc/zoneinfo/localtime 
-> ./America/New_York

Now use zdump to show the DST transitions for this time zone in 2006-2007:

# zdump -v :America/New_York | grep ‘200[67]’
:America/New_York  Fri Oct 20 14:59:45 2006 EDT
:America/New_York  Sun Apr  2 06:59:59 2006 GMT = Sun Apr  2 01:59:59 2006 EST 
isdst=0 gmtoff=-18000
:America/New_York  Sun Apr  2 07:00:00 2006 GMT = Sun Apr  2 03:00:00 2006 EDT 
isdst=1 gmtoff=-14400
:America/New_York  Sun Oct 29 05:59:59 2006 GMT = Sun Oct 29 01:59:59 2006 EDT 
isdst=1 gmtoff=-14400
:America/New_York  Sun Oct 29 06:00:00 2006 GMT = Sun Oct 29 01:00:00 2006 EST 
isdst=0 gmtoff=-18000
:America/New_York  Sun Apr  1 06:59:59 2007 GMT = Sun Apr  1 01:59:59 2007 EST 
isdst=0 gmtoff=-18000
:America/New_York  Sun Apr  1 07:00:00 2007 GMT = Sun Apr  1 03:00:00 2007 EDT 
isdst=1 gmtoff=-14400
:America/New_York  Sun Oct 28 05:59:59 2007 GMT = Sun Oct 28 01:59:59 2007 EDT 
isdst=1 gmtoff=-14400
:America/New_York  Sun Oct 28 06:00:00 2007 GMT = Sun Oct 28 01:00:00 2007 EST 
isdst=0 gmtoff=-18000

The first line of output shows the current system time.  Each subsequent pair 
of lines shows the time just before and just after a DST transition.  The 
first pair shows the spring transition to DST on the first Sunday in April, 
while the second pair shows the fall transition to Standard time on the last 
Sunday in October.  This shows that the current DST rules are in effect for 
both 2006 and 2007.  Save this output for later comparison.


Step 2: Modify the time zone source file that contains the US time zone rules.  
First, save a backup copy of this file:

# cd /etc/zoneinfo/sources
# cp northamerica northamerica.bak

Now edit file “northamerica” with an editor of your choice and find the 
section of lines that begin with “Rule      US”.  This section should look 
like this:

# Rule  NAME    FROM    TO      TYPE    IN      ON      AT      SAVE    
LETTER/S
Rule    US      1918    1919    -       Mar     lastSun 2:00    1:00    W # 
War
Rule    US      1918    1919    -       Oct     lastSun 2:00    0       S
Rule    US      1942    only    -       Feb     9       2:00    1:00    W # 
War
Rule    US      1945    only    -       Aug     14      23:00u  1:00    P # 
Peace
Rule    US      1945    only    -       Sep     30      2:00    0       S
Rule    US      1967    max     -       Oct     lastSun 2:00    0       S
Rule    US      1967    1973    -       Apr     lastSun 2:00    1:00    D
Rule    US      1974    only    -       Jan     6       2:00    1:00    D
Rule    US      1975    only    -       Feb     23      2:00    1:00    D
Rule    US      1976    1986    -       Apr     lastSun 2:00    1:00    D
Rule    US      1987    max     -       Apr     Sun>=1  2:00    1:00    D

You will need to modify two of the above lines (highlighted in bold text) and 
add two new lines at the end of the list.  In each of the bold lines, change 
“max” to “2006”.  Then add the following two lines at the end of the section:

Rule    US      2007    max     -       Mar     Sun>=8  2:00    1:00    D
Rule    US      2007    max     -       Nov     Sun>=1  2:00    0       S

The modified section should now look like this:

# Rule  NAME    FROM    TO      TYPE    IN      ON      AT      SAVE    
LETTER/S
Rule    US      1918    1919    -       Mar     lastSun 2:00    1:00    W # 
War
Rule    US      1918    1919    -       Oct     lastSun 2:00    0       S
Rule    US      1942    only    -       Feb     9       2:00    1:00    W # 
War
Rule    US      1945    only    -       Aug     14      23:00u  1:00    P # 
Peace
Rule    US      1945    only    -       Sep     30      2:00    0       S
Rule    US      1967    2006    -       Oct     lastSun 2:00    0       S
Rule    US      1967    1973    -       Apr     lastSun 2:00    1:00    D
Rule    US      1974    only    -       Jan     6       2:00    1:00    D
Rule    US      1975    only    -       Feb     23      2:00    1:00    D
Rule    US      1976    1986    -       Apr     lastSun 2:00    1:00    D
Rule    US      1987    2006    -       Apr     Sun>=1  2:00    1:00    D
Rule    US      2007    max     -       Mar     Sun>=8  2:00    1:00    D
Rule    US      2007    max     -       Nov     Sun>=1  2:00    0       S

Save the file and exit the editor.


Step 3: Compile the new timezone definitions.  Your current working directory 
should be /etc/zoneinfo/sources.

# zic northamerica
# zic backward

The second “zic” command is needed to restore some hard links for old-style 
timezones that still exist for backward compatibility.


Step 4:  Verify the changes.  Use zdump to display the DST transition times 
for 2006-7 under the new rules:

# zdump -v :America/New_York | grep ‘200[67]’
:America/New_York  Fri Oct 20 15:03:35 2006 EDT
:America/New_York  Sun Apr  2 06:59:59 2006 GMT = Sun Apr  2 01:59:59 2006 EST 
isdst=0 gmtoff=-18000
:America/New_York  Sun Apr  2 07:00:00 2006 GMT = Sun Apr  2 03:00:00 2006 EDT 
isdst=1 gmtoff=-14400
:America/New_York  Sun Oct 29 05:59:59 2006 GMT = Sun Oct 29 01:59:59 2006 EDT 
isdst=1 gmtoff=-14400
:America/New_York  Sun Oct 29 06:00:00 2006 GMT = Sun Oct 29 01:00:00 2006 EST 
isdst=0 gmtoff=-18000
:America/New_York  Sun Mar 11 06:59:59 2007 GMT = Sun Mar 11 01:59:59 2007 EST 
isdst=0 gmtoff=-18000
:America/New_York  Sun Mar 11 07:00:00 2007 GMT = Sun Mar 11 03:00:00 2007 EDT 
isdst=1 gmtoff=-14400
:America/New_York  Sun Nov  4 05:59:59 2007 GMT = Sun Nov  4 01:59:59 2007 EDT 
isdst=1 gmtoff=-14400
:America/New_York  Sun Nov  4 06:00:00 2007 GMT = Sun Nov  4 01:00:00 2007 EST 
isdst=0 gmtoff=-18000

This output shows that the transition times for 2006 are still under the old 
rules: first Sunday in April and last Sunday in October.  But starting in 
2007 (you can verify this for any other year with zdump) the transitions 
follow the new rules.  They occur on the second Sunday in March and the first 
Sunday in November.

__________

-- 
Kevin Beauchamp
Specialist Technician
University of Alberta (main campus)
Facilities and Operations
mailstop: RCMS, Room 100A
Edmonton AB
T6G 2H1 Canada
Tel: (780) 492-2074
Fax: (780) 492-5945
email: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.