2007 U.S. Daylight Saving Time TZTAB Replacement for the HPe3000

» Home

» Software
» Papers & Training
» Java

Enabling The New DST Rules For The MPE/iX POSIX Shell


The POSIX Shell running on MPE is produced by a 3rd party whose software runs on a number of different platforms including the HPe3000 and it uses a proprietary library of time functions which DO NOT use TZTAB to translate UTC to local time.

For details on how to enable the MPE/iX POSIX Shell and commands to use the new 2007 daylight saving (or summer) time rules for your area please visit our TZ and TZTAB Information page.

IMPORTANT NOTE: Programs compiled with the C library, whether run from inside the shell or from the MPE/iX command interpreter, DO use TZTAB coupled with a valid TZ variable to translate UTC to local time.
Update!

Attention Java/iX Users: As of 31 December 2006 Java/iX is no longer supported on the HPe3000, however we have two possible remedies for the 2007 Daylight Saving Time rule changes that will affect Java/iX applications. Please see Java->DST for details.
UPDATE 5 March 2007:The TZTAB file available for download here has been updated! The changes included in this file are:
  • Atlantic (AST4ADT) and Newfoundland (NST3:30NDT) Timezones now include the U.S. 2007 DST definitions.
  • Also added, for compatibility reasons only are the AST4ADT#CANADA and NST3:30NDT#CANADA Timezones which are identical to AST4ADT and NST3:30NDT respectively.
  • The Aleutian (AST10ADT) and Yukon Timezones (YST9YDT) now include the 2007 U.S. 2007 DST definitions.
  • A Western Australia Timezone (WST-8WDT) has been added covering the trial period 2007 though 31 March 2009 while Daylight Saving Time (or Summer Time) is evaluated. Note that if Western Australia permanently adopts Daylight Saving Time the TZTAB file will need to be adjusted accordingly.
  • The Canadian versions of the standard North American Timezones for Eastern, Central, Mountain and Pacific, i.e. EST5EDT#CANADA, CST6CDT#CANADA, MST7MDT#CANADA and PST8PDT#CANADA have been updated to recognize the 2007 definitions. These are now interchangeable with EST5EDT, CST6CDT, MST7MDT and PST8PDT respectively.
  • Since Mexico will not adhere to the U.S. 2007 Daylight Saving Time definitions new timezone definitions for Mexico have been added, they are:
    • CSM6CDM or CST6CDT#MEXICO - Mexico Central Timezone
    • MSM7MDM or MST7MDT#MEXICO - Mexico Mountain Timezone
    • PSM8PDM or PST8PDT#MEXICO - Mexico Pacific Timezone
    • MXST6MXDT or MXST6MXDT#MEXICO - Mexico City, Mexico Timezone
It is recommended that you install this updated copy of TZTAB at your earliest convenience.

LBCNX09 is now available from ITRC Please see "MPE Patches Replacing TZTAB" below for more details.
UPDATE 19 September 2007: The TZTAB file available for download here has been updated!

Daylight Saving Time in New Zealand will now begin on the last Sunday in September and end on the first Sunday in April. A new TZTAB file is now available for download here or via the MPE/iX patch MPENX09. Details are provided below.

Please refer to the New Zealand Department of Internal Affairs Daylight Saving Time page for more information.

Beginning in March 2007 residents of the United States will have new Daylight Saving Time rules resulting from the passage of the Energy Policy Act of 2005 . As a result a change to the C library timezone file TZTAB is necessary for the HPe3000.

This page contains links to download an updated copy of the TZTAB file containing the changes for the new 2007 Daylight Saving Time rules for the United States as well as information about how to manually replace the file. In addition you will find information about how to maintain the file past 2008 should that be necessary.

TZTAB Location and Use

The TZTAB file on the HPe3000 is located in the LIB group of the SYS account, the full file name is TZTAB.LIB.SYS.

The TZTAB file is used by C library functions such as localtime(), ctime() and mktime() to convert Coordinated Universal Time or UTC (also referred to as Greenwich Mean Time or Zulu Time) to local time. The TZTAB file contains time zone definitions which describe how many hours above or below UTC local time is. It also describes when a "Daylight Saving Time" adjustment should be made.

The C library uses the CI or shell environment variable "TZ" to determine which time zone should be used to calculate local time. For example:

In the MPE/iX Command Interpreter (or CI)
:SETVAR TZ="PST8PDT"     
Or in the shell
shell/iX> export TZ="PST8PDT"     

Downloading TZTAB


Note: It is recommended that prior to restoring the new TZTAB that you rename or copy the existing TZTAB file. Please see Installation Tips below for more details.
Note: When the TZTAB file is accessed by a C library function it is opened and then immediately closed so it will probably not appear to be accessed if you use one of the the MPE/iX CI LISTFILE command formats to view it. If your applications frequently call C library functions you should consider replacing the TZTAB file during a period of low system activity to prevent the possiblity that a call to a C library time function using TZTAB may fail to find the file. If that were to happen that time function would translate UTC to U.S. Eastern Standard Time.

The replacement TZTAB is available in two formats, a byte stream store-to-disk file and in WRQ Reflection "Label" Format.

If you choose to use the store-to-disk format you will need to download the file to your PC and then transfer it to your HPe3000 using FTP or a similar method such as WRQ Reflection "Binary" file transfer. Once on your HP3000 translate it from a byte stream file to a fixed record file as follows:

:RUN FROMBYTE.HPBIN.SYS;info="-b ./tztab.std TZTABSTD"

This will translate the downloaded file "./tztab.std" into a fixed record binary file called TZTABSTD. With that you can then restore TZTAB. For example:

:FILE T=TZTABSTD;DEV=DISC
:RESTORE *T;TZTAB.LIB.SYS;SHOW

If you choose to download the WRQ Reflection "Label" format you would download the file to your PC and use the WRQ Reflection "Label" file transfer option to move the file to your HPe3000. This method does not require that you translate the file from byte stream to fixed format once downloaded to your HPe3000.


Note: If you are using Microsoft's Internet Explorer you will need to right click the link above and select "Save Target As..." to download the WRQ Reflection "Label" format copy of TZTAB. TZTAB is a text file and so is the "Label" format produced by WRQ Reflection therefore IE will want to display that in the browser window rather than issuing a download dialog box. This behavior may also be true for other browser types.

MPE Patches Replacing TZTAB

The MPE patch LBCNX09 is now available for download from itrc.hp.com which will also replace the TZTAB file.

Please note that LBCNX09 supersedes LBCMXY5.

Versions of this patch are:
  • LBCNX09A for MPE/iX 7.5, C.75.00
  • LBCNX09B for MPE/iX 7.0, C.70.00
  • LBCNX09C for MPE/iX 6.5, C.65.00
The copy of TZTAB available for download here is exactly the same as delivered in these patches. These patches do nothing more than replace the TZTAB file so there is no difference between replacing the file with the download provided here or using one of the patches.

Identifying Versions of TZTAB.LIB.SYS

The TZTAB file installed by LBCNX09 will contain the following as the first line of that file:

# @(#) HP C/iX Library A.xx.02 2007-09-01

The TZTAB file installed by LBCMXY5 will contain the following as the first line

# @(#) HP C/iX Library A.xx.01 2007-03-01

And the TZTAB file installed by LBCMXX4 will contain the following as the first line of that file:

# @(#) HP C/iX Library A.xx.00 2006-09-20

Where: 'xx' will be 75 for MPE/iX 7.5, 70 for MPE/iX 7.0 and 65 for MPE/iX 6.5. However this file is NOT MPE/iX version dependent. The release "VUF" indicator is only used for consistency in MPE/iX patches. It does not matter whether that "VUF" matches the release of MPE/iX running on the system! Any version of the current file will work on any version of MPE.

Earlier versions of TZTAB may contain the first line reading:

# @(#) HP C/iX Library A.06.04 2000-11-10

Or other similar values.

Notes on Using LBCNX09 To Replace TZTAB

If you elect to install one of the official patches that replace TZTAB the PatchiX installation process will first create a CSLT/STORE tape of the TZTAB file and then require a "Phase II" where the file will be restored to its proper location in LIB.SYS. PatchiX will not create a copy of the old file. If you wish to retain a copy of the original TZTAB you will need to manually COPY the existing TZTAB file before beginning the Phase II process, for example:

    :COPY TZTAB.LIB.SYS,TZTABOLD.LIB.SYS

As with the manual installation process if your applications make frequent calls to C library time functions (ctime(), mktime(), localtime() etc.) then you should consider installing the TZTAB replacement patch during a period of low system activity.

Changes Take Effect Immediately

There is no need to reboot your HPe3000 after replacing the TZTAB file. Changes take effect immediately.

Installation

A quick way to restore and replace the new TZTAB would be to upload the WRQ Label format file from this page (see Downloading TZTAB above) and then download it to your HPe3000 using an alternate name such as "TZTABNEW" for example. Then use an MPE/iX Command Interpreter script to quickly swap the new file for the old and retain the old file should it be needed in the future.

Here is a very simple CI script that will do this:
parm newfile='TZTABNEW.LIB.SYS'
parm oldfile='TZTABOLD.LIB.SYS'
#
# If the renamed old copy of TZTAB exists this
# script may have already been run.
#
IF finfo("!oldfile", "exists") THEN
    echo ********************************
    echo * A SAVED COPY OF TZTAB ALREADY
    echo * EXISTS WITH THE NAME !oldfile
    echo * SCRIPT STOPPED!
    echo ********************************
    ESCAPE
ENDIF
#
# Make sure TZTABNEW exists before beginning.
#
IF NOT finfo("!newfile", "exists") THEN
    echo *********************************
    echo * THERE IS NO NEW COPY OF TZTAB  
    echo * AVAILABLE WITH THE NAME !newfile
    echo * SCRIPT STOPPED!   
    echo *********************************
    ESCAPE
ENDIF
#
# Quickly swap the files.
#
rename TZTAB.LIB.SYS,!oldfile
rename !newfile,TZTAB.LIB.SYS
echo
echo The new TZTAB has been successfully installed and
echo the prior copy is now called !oldfile
echo
#
# Done.
#

Maintaining TZTAB

Under section 110 of the Energy Policy Act of 2005 the Secretary of the U.S. Department of Energy must make a report to the Congress of the United States on the effectiveness of the daylight saving time changes on energy consumption in the U.S. no later than 9 months after its implementation. The Congress of the United States reserves the right to revert the daylight saving time rules to those implemented in 1986 and in use through 2006 based on that report.

Should congress opt to revert U.S. daylight saving time to the pre-2007 rules this change will probably take effect after the end of MPE/iX support on 31 December 2008.

Should other changes to the TZTAB file be required now or in the future here are some guidelines for making these changes.

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   PDT8
0 1 24-30 11 1974      0   PDT8
0 1 25-31 10 1975-2006 0   PDT8
0 1 1-7   11 2007-2038 0   PDT8
The format of the TZTAB file used on the HPe3000 is identical to that used on HPUX systems with one significant difference; the "tzname" fields (underlined in the example above) must be UPPER case on the HPe3000. However, the value of the CI or shell variable "TZ" is case insensitive.

Since the format of the TZTAB file on the HPe3000 is the same as that on HPUX should extensive changes to TZTAB be required in the future you could obtain an updated copy of TZTAB as delivered in an HPUX patch and use that file on your HPe3000. Remember to upshift any lower or mixed-case "tzname" fields!

Older MPE/iX Releases

The TZTAB file available on this page can be used on releases prior to MPE/iX 6.5. If you are running an older copy of MPE and have a TZTAB.LIB.SYS you can replace that copy with the file downloaded here.

Top    JazzInfo    Hosted by 3kRanger.com    email 3kRanger    Updated