FIXCLOCK alters software, hardware clocks
March 11, 2014
My HP 3000 system was still on EST, so I wanted to change it during startup. I answered "N" to the date/time setting at end of startup, and it refused my entry of 03/09/14; it returned a question mark. After several quick CR, it set the clock back to 1 Jan 85, which is where it is now waiting.
Gilles Schipper of GSA responds:
While the system is up and running, you could try (while the system is up and running):
:setclock ;date=mm/dd/yyyy;time=hh:mm
:setclock ;cancel
:setclock ;timezone=w5:00 (for example)
:setclock ;cancel (again)
Brian Edminster of Applied Technologies notes:
I'd been quite surprised by how many small 'single machine' shops don't properly set the hardware clock to GMT with the software clock offset by 'timezone' Instead, they have their hardware and software clock set to the same time, use the 'setclock correction=' and then give either a +3600 or -3600, for spring or fall time changes.
Allegro's got a simple command file called FIXCLOCK, on their Free Allegro Software page, that allows fixing the hardware clock AND properly setting the time-offset for the software clock -- all without having to take the system down.
Here's the jobstream code for both the spring and fall time changes. You can use this and modify it for your specific needs. Note that it's set up for the Eastern US time zone. (That's the TIMEZONE = W5:00 -- meaning the number of hours different than GMT -- and TIMEZONE = W4:00 lines.) Modify these lines as necessary for your timezone.
!JOB TIMECHG,MANAGER/user-passwd.SYS/acct-passwd;hipri;PRI=CS;OUTCLASS=,1
!
!setvar Sunday, 1
!
!setvar March, 3
!setvar November, 11
!
!showclock
!if hpday = Sunday and &
! hpmonth = November and &
! hpdate < 8 then
! comment (first Sunday of November)
! SETCLOCK TIMEZONE = W5:00
! TELLOP ********************************************
! TELLOP Changing the system clock to STANDARD TIME.
! TELLOP The clock will S L O W D O W N until
! TELLOP we have fallen back one hour.
! TELLOP ********************************************
!elseif hpday = Sunday and &
! hpmonth = March and &
! hpdate > 7 and hpdate < 15 then
! comment (second Sunday of March)
! SETCLOCK TIMEZONE = W4:00
! TELLOP *********************************************
! TELLOP Changing the system clock to DAYLIGHT SAVINGS
! TELLOP TIME. The clock jumped ahead one hour.
! TELLOP *********************************************
!else
! comment (no changes today!)
! TELLOP *********************************************
! TELLOP No Standard/Daylight Savings Time Chgs Req'd
! TELLOP *********************************************
!endif
!
!comment - to avoid 'looping' on fast CPU's pause long enough for
!comment - local clock time to be > 2:00a, even in fall...
!while hphour = 2 and hpminute = 0
! TELLOP Pausing 1 minute... waiting to pass 2am
! TELLOP Current Date/Time: !HPDATEF - !HPTIMEF
! showtime
! pause 60
!endwhile
!
!stream timechg.jcl.sys;day=sunday;at=02:00
!showclock
!EOJ
Do a showclock to confirm results. Careful, though, of any existing running jobs or sessions that may be clock-dependent.