« Count on those massive disks really working | Main | Reliable advice on speeding up 3000s »

March 31, 2006

A day to focus on later dates

This weekend, Daylight Savings Time takes hold in many countries — earlier than ever in the month of April. It will be the final April where the change will take place, in the US; beginning in 2007, as a result of a new federal law, DST kicks in during March. The shifting nature of that time change might pose a puzzle for some 3000 administrators. A command file can help in getting the 3000 on the correct time, and keeping it there through 2007's new cutover dates.

SETCLOCK is at the heart of the 3000's time change capabilities. The command has had some problems in the past, flaws that HP has always fixed in due time. Back in 2002, the command was patched in mid-year for MPE/iX, although HP didn't make an announcement about the fix in a timely fashion, so to speak. Applying the latest PowerPatch to 7.0 brings SETCLOCK up to date.

A command file written by Dave Powell of MMFab will keep the 3000 caught up with the changes in time changes, both this year, and in years to come.

Powell offered his command file in two flavors:

!#   Check for Daylight Saving Time change -- NEW
!IF  HPDAY = 1
!    IF  HPYYYY <= 2006
!        IF  HPMONTH = 4   AND   HPDATE < 8
!            SETCLOCK TIMEZONE = W7:00
!        ELSEIF  HPMONTH = 10   AND   HPDATE > 24
!            SETCLOCK TIMEZONE = W8:00
!        ENDIF
!    ELSE
!        IF  HPMONTH = 3   AND   HPDATE >= 8   AND   HPDATE <= 14
!            SETCLOCK TIMEZONE = W7:00
!        ELSEIF  HPMONTH = 11   AND   HPDATE <= 7
!            SETCLOCK TIMEZONE = W8:00
!        ENDIF
!    ENDIF
!ENDIF

or, if you don't like white space....

!#   Check for Daylight Saving Time change -- NEW (condensed)
!IF HPMONTH=3 AND HPDAY=1 AND HPYYYY>2006 AND HPDATE>7 AND HPDATE<15
!    SETCLOCK TIMEZONE = W7:00
!ELSEIF HPMONTH=11 AND HPDAY=1 AND HPYYYY>2006 AND HPDATE<8
!    SETCLOCK TIMEZONE = W8:00
!ELSEIF HPMONTH=4 AND HPDAY=1 AND HPYYYY<2007 AND HPDATE<8
!    SETCLOCK TIMEZONE = W7:00
!ELSEIF HPMONTH=10 AND HPDAY=1 AND HPYYYY<2007 AND HPDATE>24
!    SETCLOCK TIMEZONE = W8:00
!ENDIF

There's been a tradition of checking on how to shift the 3000's time in the weeks leading up to the change. The 3000 NewsWire has reported several strategies, including advice on understanding the difference between hardware and software clocks on the system. John Clogg explained:

The hardware clock is supposed to be set to UCT (AKA GMT), and the “software” time is derived using a time zone offset that is manipulated by the SETCLOCK command. It is not unusual to see systems where this relationship isn’t understood, where the hardware clock has never been set correctly, so the offset is hundreds of hours! The SHOWCLOCK command will show you the current status of the hardware and software clocks. In general, the SETCLOCK command adjusts the offset, and the date and time setup during a system start adjusts the hardware clock.

Stan Sieler added that a free FIXCLOCK command file at www.allegro.com/software/hp3000/allegro.html can help you fix the hardware clock date/time.

Then there's the nuance of using NTPDATE, or not, during the springtime DST change:

For the last couple of years during the time change, we have started also running an NTP time synchronization job at 3:00 AM every morning. The TZ variable is set to PST8PDT. Now as I understand it, NTP is adjusting the UTC time. But does it also adjust the time zone? In other words, are we duplicating effort with these jobs?

                                                

John Clogg replies:
                                                
    NTPDATE will not adjust the time zone. It will only accomplish the tiny adjustment to UTC time caused by the drift in your system’s hardware clock. There is no problem running both programs the same night, as long as your DST adjustment has completed when you run the NTP adjustment. Since the spring adjustment moves the clock forward, it will happen immediately. The autumn adjustment can take a couple of hours or more, so it calls for greater coordination.

12:34 AM in Hidden Value, Homesteading | Permalink

Bookmark and Share

Use our search engine to find 20 years
of HP 3000 news and articles

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83452e85869e200d8355fb34769e2

Listed below are links to weblogs that reference A day to focus on later dates:

Comments

Comments

The comments to this entry are closed.