A SERVICE OF

logo

Chapter 7 549
Command Definitions S-SO
SETCLOCK
On the HP3000 Universal Time (GMT) is calculated by starting with local time and adding
or subtracting a time zone offset. When changing time zones (such as moving from
Standard to Daylight Savings Time and back) the local time is altered, but this change
must not affect Universal Time. To prevent Universal Time from being altered, both the
local time and the system time zone offset must be adjusted. Therefore, using the Time
Zone form of this command is the only way to accurately change time zones.
If the Date-Time or Correction form of the command is used, Universal Time will drift
along with local time. Thus, the Date-Time and Correction forms of this command should
only be used to adjust the clock for drift, not to change time zones.
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.
How a Gradual Time Change Works
Whether the Date-Time or a Correction form is used, the default method of changing the
time is to gradually speed up or slow down the system clock until the change is achieved.
Thus, even when a previous time is requested, the system clock will still move forward,
although at a slower pace than real time. This slower pace will continue until the desired
time "catches up" with the system clock. Because of the system clock's forward motion,
there will never be a case where two consecutive timestamps appear to be out of sequence
and where system time appears to run backwards.
This change in clock speed is accomplished by establishing a system time correction which
is gradually consumed. During this time the system clock speeds up or slows down as
necessary. When the correction reaches zero, the system clock resumes its normal pace.
The rate of the correction depends on the load on the system. The correction rate will be
slowed down by frequent timestamp requests, file accesses and frequent operating system
activity such as context switches. In general, the correction will take no longer than twice
the requested time difference. For example, a request to slow down the clock by one hour
will take a maximum of two hours to complete.
Results of the ;CANCEL Parameter