1stime(2)                         System Calls                         stime(2)
2
3
4

NAME

6       stime - set system time and date
7

SYNOPSIS

9       #include <unistd.h>
10
11       int stime(const time_t *tp);
12
13

DESCRIPTION

15       The  stime() function sets the system's idea of the time and date.  The
16       tp argument points to the value of time as  measured  in  seconds  from
17       00:00:00 UTC January 1, 1970.
18

RETURN VALUES

20       Upon  successful  completion,  0 is returned. Otherwise, −1 is returned
21       and errno is set to indicate the error.
22

ERRORS

24       The stime() function will fail if:
25
26       EINVAL    The tp argument points to an invalid (negative) value.
27
28
29       EPERM     The {PRIV_SYS_TIME} privilege is not asserted in  the  effec‐
30                 tive set of the calling process.
31
32

SEE ALSO

34       time(2), privileges(5)
35
36
37
38SunOS 5.11                        22 Mar 2004                         stime(2)
Impressum