Set your 3000 clocks all the time
March 12, 2012
It's not too late this morning, even if it seems like it when you look at your watch on the first Monday after the time change. There's still time to get your HP 3000 clock set accurately. Last Friday the community was trading tips and technique about how to get on time. Donna Hofmeister, whose firm Allegro Consultants hosts the free nettime utility, explains how time checks on a regular basis keep your clocks, well, regular.
This Sunday when using SETCLOCK to set the time ahead one hour, should the timezone be advanced one hour as well?
The cure is to run a clock setting job every Sunday and not go running about twice a year. You'll gain the benefit of regular scheduling and a mostly time-sync'd system.
In step a-1 of the job supplied below you'll find the following line:
!/NTP/CURRENT/bin/ntpdate "-B timesrv.someplace.com"
Clearly, this needs to be changed.
If for some dreadful reason you're not running NTP, you might want to check out 'nettime'. And while you're there, pick up a copy of 'bigdirs' and run it -- please!
SETVAR TZ "PST8PDT"
Adapt as needed. And don't forget -- if your tztab file is out of date, just grab a copy from another system. It's just a file.
This job below was adapted from logic developed by Paul Christidis:
!JOB SETTIME,MANAGER.SYS;OUTCLASS=,5
!TELLOP SETTIME
!TELLOP ALL MPE SYSTEMS
!TELLOP ==SETTIME -- SYNCs SYSTEM CLOCK W/ TIME SERVER !
!# from the help text for setclock....
!# Results of the Time Zone Form
!#
!# If the change in time zone is to a later time (a change to Daylight
!# Savings Time or an "Eastern" geographic movement), both local time
!# and the time zone offset are changed immediately.
!#
!# The effect is that users of local system time will see an immediate
!# jump forward to the new time zone, while users of Universal Time
!# will see no change.
!#
!# If the change in time zone is to an earlier time (a change from
!# Daylight Savings to Standard Time or a "Western" geographic
!# movement), the time zone offset is changed immediately. Then the
!# local time slows down until the system time corresponds to the
!# time in the new time zone.
!#
!# The effect is that users of local system time will see a gradual
!# slowdown to match the new time zone, while users of Universal Time
!# will see an immediate forward jump, then a slowdown until the
!# system time again matches "real" Universal Time.
!#
!# This method of changing time zones ensures that no out-of-sequence
!# time stamps will occur either in local time or in Universal Time.
!#
!showclock
!showjob job=@j
!TELLOP ===================================== SETTIME A-1
!
!errclear
!continue
!/NTP/CURRENT/bin/ntpdate "-B timesrv.someplace.com"
!if hpcierr <> 0
! echo hpcierr !hpcierr (!hpcierrmsg)
! showvar
! tellop NTPDATE problem
!endif
!
!tellop SETTIME -- Pausing for time adjustment to complete....
!pause 60
!
!TELLOP ===================================== SETTIME B-1
!showclock
!
!setvar FallPoint &
! (hpyyyy<=2006 AND (hpmonth = 10 AND hpdate > 24)) OR &
! (hpyyyy>=2007 AND (hpmonth = 11 AND hpdate < 8))
!
!setvar SpringPoint &
! (hpyyyy<=2006 AND (hpmonth = 4 AND hpdate< 8)) OR &
! (hpyyyy>=2007 AND (hpmonth = 3 AND (hpdate > 7 AND hpdate < 15)))
!
!# TZ should always be found
! if hpday = 1
! if SpringPoint
!# switch to daylight savings time
! setvar _tz_offset ![rht(lft(TZ,4),1)]-1
! setclock timezone=w![_tz_offset]:00
! elseif FallPoint
!# switch to standard time
! setvar _tz_offset ![rht(lft(TZ,4),1)]
! setclock timezone=w![_tz_offset]:00
! endif
! endif
!endif
!
!TELLOP ===================================== SETTIME C-1
!
!showclock
!EOJ
Mark Ranft of 3k Pro added some experience with international clocks on the 3000.
If international time conversion is important to you, there are two additional things to do.
1) Set a system-wide UDC to set the TZ variable. (And perhaps account UDCs if accounts are for different locations)
:showvar tz
TZ = CST6CDT
2) There is also a tztab.lib.sys that needs to be updated when countries change when or if they do DST.
:l tztab.lib.sys
ACCOUNT= SYS GROUP= LIB
FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----
SIZE TYP EOF LIMIT R/B SECTORS #X MX
TZTAB 1276B VA 681 681 1 96 1 8
:print tztab.lib
# @(#) HP C/iX Library A.75.03 2008-02-26
# Mitteleuropaeische Zeit, Mitteleuropaeische Sommerzeit
MEZ-1MESZ
0 3 25-31 3 1983-2038 0 MESZ-2
0 2 24-30 9 1983-1995 0 MEZ-1
0 2 25-31 10 1996-2038 0 MEZ-1
# Middle European Time, Middle European Time Daylight Savings Time
<< snipped >>