It's About Time
Marking Time with MPE's TZTAB File

Changing Clocks for Good Maintenance

By Gilles Schipper

Second in a series

Two weeks from this weekend, Daylight Saving Time ends for 2012. It may be an appropriate time to think about implementing some best practices associated with “Clock Maintenance” for the HP 3000s that you administer. For example, there's the task of changing the system clocks for other than trivial or TIMEZONE changes.

Your system clocks can be inaccurate either because they are out of sync with each other (ie. wrong TIMEZONE setting) or they simply contain the wrong time, or both. If your problem is an incorrect TIMEZONE (as shown by the SHOWCLOCK command) you can easily and quickly correct with the SETCLOCK TIMEZONE= command.

Keep in mind that if this command would normally result in a backwards time adjustment, the change will take place gradually such that the system clocks will never go back in time.(This default behaviour can be overridden with the ;NOW option of the SETCLOCK command). If the SETCLOCK command results in a time advancement, the advancement takes place immediately.

Again, you can use the SHOWCLOCK command to see the current time, timezone as well as the pending time correction in seconds. If you are experiencing both a timezone problem and clock accuracy issues, that's another matter.

If you are experiencing both a timezone problem AND a clock accuracy issue, you can effect a correction as follows:

:setclock timezone=w5:00

:setclock ;cancel (which cancels any pending gradual changes and permits the subsequent setclock command to succeed.)

:setclock ;date=mm/dd/yy;time=hh:mm;now (the date/time should correspond to your desired “software” clock - ie, the actual location-specific date/time.)

Be careful if the above command sequence will result in the clocks being adjusted backwards that could affect any scheduled jobs or any running application that is date/time sensitive.

If the timezone is correct and you wish only to adjust your software clock, you can simplify by:

:setclock ;correction=no-of-seconds (plus or minus)

Regular Clock Maintenance

Now that you've set your system clocks appropriately, just like any nice-looking grass lawn, they need regular maintenance to stay nice-looking -- or accurate.

From my experience, HP 3000 system clocks are woefully inaccurate if left to their own. They tend to lose time over periods of time - notwithstanding power failures combined with non-functioning main-board batteries and UPS's, in which case the magnitude of clock discrepancy would be much larger.

The System Administrator can solve the clock maintenance problem in two ways:

1. Manually, by checking the system clocks at regular intervals with the SHOWCLOCK command, and, when necessary, issue the appropriate SETCLOCK command to effect adjustments, or

2. Automagically, by utilizing an available utility, called NTPDATE, scheduled to run at regular intervals to adjust your system clocks to the correct time.

Naturally, being a suitably lazy SysAdmin, I prefer option 2.

Since this utility works extremely well when used modestly, I choose to execute it once daily - at most. (Depending upon how inaccurate your system clock is and your tolerance for clock variances, you can choose to run it weekly or monthly)

The NTPDATE utility should be available from whoever is currently maintaining the old Interex contributed library, or an echo of the old HP Jazz site. It comprises a single program, called NTPDATE and can be located in PUB.SYS or whichever group/account you wish having PM capability.

To execute, simply “”

It will synchronize your software clock with the time servers at and according to the value of your TIMEZONE setting. You can follow the ntpdate command with a showclock command to see if any adjustments were necessary. You can replace with any suitable time server that you prefer and have access to.

Placing this command in a regularly executing job stream will keep your system clocks accurate and worry-free while you work on other things. 

Next time: The nuances of HP's TZTAB file formats