stime(2) CLIX stime(2)
NAME
stime - Sets time
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
int stime(
long *tp );
PARAMETERS
tp Points to the value of time as measured in seconds from 00:00:00
Greenwich Mean Time (GMT) January 1, 1970.
DESCRIPTION
The stime() function sets the system's time and date.
EXAMPLES
To set the system time:
if (time(&num_seconds) != 0)
perror("time failed");
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, a value
of -1 is returned and errno is set to indicate the error.
ERRORS
This function fails if the following is true:
[EPERM] The effective user ID of the calling process is not superuser.
RELATED INFORMATION
Functions: time(2)
2/94 - Intergraph Corporation 1