PreviousNext

clock set

Sets the clock to the specified time. The syntax is:

clock set [dts_entity] {-to DTS_timestamp

[-abruptly -epoch epoch_number | -bypass] | -epoch epoch_number}

Options

-to DTS_timestamp
This required option specifies a DTS timestamp as the time to which to set the clock. You can specify the time using the ISO-compliant time format CCYY-MM-DD-hh:mm:ss.fff.

-abruptly
Specifies to set the clock abruptly rather than gradually adjust it to the computed time.

-bypass
Sets the system clock to the specified time without using DTS.

-epoch epoch_number
Used only with the -abruptly option, use the -epoch option to specify an epoch_number that matches the epochs of servers with which the local clock synchronizes.

Description
The clock set operation sets the local clock to the specified time. An optional argument specifies to set the clock on a remote host. The required -to option specifies a DTS timestamp as the time to which to set the clock. If you do not specify the -bypass option, DTS adjusts the clock gradually to the specified time. This command takes an -abruptly option, which specifies that the time is to be immediately changed to the specified time. When this option is present the -epoch option must also be specified to indicate a new epoch. This operation returns an empty string on success.

Note that setting your system clock is a dangerous operation. If your machine is not synchronized with other machines in the cell, other DCE services, especially CDS, will not operate correctly. See the OSF DCE Administration Guide - Core Components for more information about DTS.

Privileges Required
You must have w (write) permission on the clock object /.:/hosts/hostname/dts-entity if using DTS to set the time, otherwise no special privileges are required.

Examples

dcecp> clock set -to 1994-07-15-16:27:28.000-04:00 -abruptly -epoch 1
dcecp>
dcecp> clock set -to 1994-07-15-16:27:28
dcecp>