stime(2) SDK R4.11 stime(2)
NAME
stime - set time
SYNOPSIS
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
int stime (seconds)
timet * seconds;
where:
seconds Address of an initialized longword interpreted as the new
system time
DESCRIPTION
Stime sets the system's notion of the current Greenwich time to the
value contained in the longword at the location specified by seconds.
When the time is successfully changed, a log of the change is sent to
the error logger device.
The time value specified is interpreted as Greenwich time expressed
in seconds since midnight January 1, 1970.
Setting the system clock may interfere with other timing functions.
ACCESS CONTROL
Only a user with appropriate privilege may set the time of day.
For systems supporting the DG/UX Capability Option, appropriate
privilege is defined as having one or more specific capabilities
enabled in the effective capability set of the calling process. See
capdefaults(5) for the default capability for this system call.
On systems without the DG/UX Capability Option, appropriate privilege
means that the process has an effective UID of root. See the
appropriateprivilege(5) man page for more information.
RETURN VALUE
0 Completed successfully.
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
EPERM Permission to change the system time is denied to the
calling process.
EFAULT The seconds argument references invalid memory.
SEE ALSO
settimeofday(2), time(2), appropriateprivilege(5).
capdefaults(5).
Licensed material--property of copyright holder(s)