![]() |
![]() |
|
|
![]() |
![]() |
MPE/iX Commands Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 7 Command Definitions S-SO![]() SETCLOCK |
|
Alters the system time or system time zone.
The SETCLOCK command is used to change the system time or to change the system's time zone. Changing the system time or time zone does not affect any interval timers in effect. Thus, a PAUSE for a given time duration will maintain that same duration regardless of how the system time is changed. Changing the system time or time zone will cause any jobs streamed with a time specification (;AT=, ;DAY=, ;DATE= or ;IN=) to be introduced in accordance with the newly-changed system time. Thus, a job streamed with ;AT=9:00 will be introduced when the changed system time is equal to 9:00. The user may provide SETCLOCK with a date and time, a time correction, or a time zone. The Date-Time form, the Correction form, and the Time Zone form are mutually exclusive; for instance, the user may not provide specifications for both a time correction and a time zone in a single command. The Date-Time and Correction forms of the command are intended for slight adjustments of the system time. For example, these forms would be used to move the time forward or backward slightly in order to keep the system time synchronized with an external time source. Both local and Universal (GMT) time are adjusted. The Time Zone form of the command is intended for the larger time changes required to move the system to a new time zone, such as moving between Standard Time and Daylight Savings Time. This form of the command alters the local time without changing Universal Time. Date-Time: If the Date-Time form of the command is used, the system time is adjusted to the specified date and time. This adjustment is gradual by default. It may be made immediate if ;NOW is specified and the user has System Manager (SM) capability. Correction: If the Correction form of the command is used, the system time is adjusted forward or backward by the amount of the correction. This adjustment is always gradual. Time Zone: If the Time Zone form is used, local time is adjusted to match that of the specified time zone. In addition, the system time zone offset is changed to reflect the new time zone. The Use of The Time Zone Offset 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
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 Any time during an on-going correction, issuing this command with the ;CANCEL parameter will immediately set the correction to zero and cause the system clock to resume its normal pace. Any previous correction will remain. When this option is used, the system will report the amount of correction which was cancelled. How a System Time Change Affects Accounting Information Changing the system time, even gradually, may cause accounting CONNECT-MINUTES to be distorted. Anyone logging on before the change and then logging off after the change is completed will have their accounting CONNECT-MINUTES data distorted; if the time change is forward, CONNECT-MINUTES will be increased by the amount of the time change, and if the time change is backward, CONNECT-MINUTES will be decreased by the amount of the time change. Dangers in Using the ;NOW Parameter The ;NOW parameter permits immediate forward or backward time changes. However, several dangerous situations can occur:
This list is only meant to include a few of the dangers associated with an immediate time change; this list does not represent all of the problems likely to be encountered. Therefore, if the ;NOW option must be used, it should be used only with a full knowledge of its effects on the system's workload. This command may be issued from a session, job, program, or in BREAK. Pressing Break has no effect on this command. Diagnostician (DI) and either Operator (OP) or System Manager (SM) capabilities are required to issue this command. Additionally, System Manager (SM) capabiltiy is required to use the ;NOW parameter. The following example illustrates setting the system time by providing a date and time:
The following example illustrates providing a time correction to advance the system time by one hour.
or
Both of the above examples cause Universal Time (GMT) to change as well as local time, and therefore while they are useful in correcting the system time for drift (time gain or loss), they are not accurate ways to change time zones. The following example illustrates setting a time correction, executing a SHOWCLOCK command, cancelling the correction, then again executing a SHOWCLOCK command. Note that by the time of the first SHOWCLOCK the correction has already begun to be consumed.
Note that in the example above the system clock was slower than normal for several minutes. Cancelling the correction did not undo that change; it merely prevented any further time change. Thus after this sequence of commands, the system clock is set to a slightly earlier time than if no SETCLOCK command had been issued. Moving from Standard Time to Daylight Savings Time: The following example illustrates changing the system time zone offset from 8 hours 00 minutes in the Western Hemisphere (Pacific Standard Time) to 7 hours 00 minutes in the Western Hemisphere (Pacific Daylight Savings Time). This command will cause local time to jump forward immediately one hour. Universal Time will be unchanged.
Moving from Daylight Savings Time to Standard Time: The following example illustrates changing the system time zone offset from 7 hours 00 minutes in the Western Hemisphere (Pacific Daylight Savings Time) back to 8 hours 00 minutes in the Western Hemisphere (Pacific Standard Time). This command will cause local time to slow down until it loses one hour. Users of Universal Time will see an immediate one-hour jump forward, followed by a slowdown until system Univeral Time again matches real Universal Time.
|
![]() |
||
![]() |
![]() |
![]() |
|||||||||
|