|
The online home of the company
bringing you quality HP hardware and software support |
|
|
I'm sure you are aware of the change to Daylight Savings Time that begins this year. Beginning in 2007 Daylight Savings Time starts on the second Sunday in March and ends the first Sunday in November. Click Here for important updates on known problems and fixes Time keeping on MPE seems rather complicated. Let me attempt to simplify it. Internally MPE keeps time as GMT (Greenwich Mean Time), also known as UTC (Universal Time or Coordinated Universal Time). This is the only clock MPE keeps and is often referred to as the hardware clock. Local time is calculated based upon the TIMEZONE offset specified using the SETCLOCK command. MPE commands such as SHOWTIME and LISTF, as well as intrinsics like CLOCK obtain the current time of day using the GMT plus or minus the timezone offset. This calculated local time is frequently called the software clock. Twice a year the timezone offset must be adjusted using SETCLOCK. Systems that are automated to reset the TIMEZONE on the correct dates must be adjusted to deal with this change. As an example we have an HP3000 that schedules a time change job for every Sunday at 2:00 AM. The job contains logic to determine if this is the correct day to adjust the timezone. The logic in this job will have to be modified for the new rules. The new job looks like this:
On the other hand, utilities that use the C library functions to get the current time operate differently. C functions are callable routines just like MPE intrinsics. Examples of applications that use the C library are the Posix shell, any ported Posix tools such as sendmail, Samba, Apache, and Syslog. Likewise, Cognos Powerhouse, Suprtool, and the Cobol85 function CURRENT-DATE call the the C library functions to get the current date and time. The C function 'ctime' obtains the current time GMT and then automatically applies the correct offset based on a table kept in the file TZTAB.LIB.SYS. In order to find the correct table entry the TZ variable must be set telling the system what the local time zone is. If no TZ variable is set MPE defaults to Eastern Time using the value 'EST5EDT'. The great thing about this method is that the time zone need not be adjusted twice a year. Once the correct TZ variable is set the transitions into and out of Daylight Savings Time occur automatically. The only time an adjustment is necessary is when the rules for DST change. Which brings us back to the original point. A new TZTAB file must be installed prior to March to avoid any problems. Rather than delivering this via a patch and since it is just a simple text file, HP has made a new version of TZTAB available via download from http://jazz.external.hp.com/TZTAB/index.html. The key to installing a new TZTAB file is to understand that programs are constantly accessing the file. While the installation is a simple rename or copy it is still advisable to install it with exclusive access to the system or during a period of low activity. Otherwise you run the risk of aborting a program that attempts to access TZTAB during the small window of time where it is not available. TZTAB can be installed early, it need not be installed on the exact date the new rules take effect. HP's delivery method for the TZTAB file has proved to be cumbersome to some users. The MPE TZTAB file can be found here in ASCII format. Or click here to download a copy of TZTAB and the sample job listed above. A simple ASCII file transfer to the HP is all that is needed The latest version of TZTAB.LIB.SYS, released 3/5/2007, has an EOF of 670 records. As long as your TZTAB file contains 670 records do not worry that the previous version was 1276 byte variable ASCII and the new one is 80 bytes or 252 bytes wide. Problems and Fixes Encountered - Updated: 3/13/2007. Now that the actual time change has taken place a number of problems have been uncovered. Listed below are the known problems and their fixes or workarounds. SHOWCLKS.PUBXL.TELESUP reports systems in Eastern Time Zone still off by 1 hour even with new TZTAB file in place. This occurs when there isn't a TZ variable set. MPE has always defaulted to the timezone setting EST5EDT when no TZ variable was explicitly set. But these rules were hardcoded in the ctime function rather than obtaining the information from TZTAB. If Cobol programs using FUNCTION CURRENT-DATE or Cognos Powerhouse programs are reporting the wrong time you must explicitly set the TZ variable in your system-wide logon UDC by including the command The Posix shell date command and other programs such as sendmail that obtain the date from the shell are not picking up the tztabchanges. The fix for this is to explicitly set timezone information into the tztab variable by adding one of the following entries into the file /etc/profile.local based upon the proper time zone: This fix works by loading the actual month/day of week/week of month/time of day the time change occurs in the TZ variable. This is a standard method of loading data into the TZ variable that is supported on most variations of Posix/Unix. Enter man timezone in the Posix shell for further explanation. |
Send mail to
webmaster@beechglen.com with
questions or comments about this web site.
|