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

NAME

6       stime - set time
7

SYNOPSIS

9       #include <time.h>
10
11       [[deprecated]] int stime(const time_t *t);
12
13   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15       stime():
16           Since glibc 2.19:
17               _DEFAULT_SOURCE
18           glibc 2.19 and earlier:
19               _SVID_SOURCE
20

DESCRIPTION

22       NOTE: This function is deprecated; use clock_settime(2) instead.
23
24       stime() sets the system's idea of the time and date.  The time, pointed
25       to by t, is measured in seconds since the  Epoch,  1970-01-01  00:00:00
26       +0000 (UTC).  stime() may be executed only by the superuser.
27

RETURN VALUE

29       On  success,  zero is returned.  On error, -1 is returned, and errno is
30       set to indicate the error.
31

ERRORS

33       EFAULT Error in getting information from user space.
34
35       EPERM  The calling process has insufficient  privilege.   Under  Linux,
36              the CAP_SYS_TIME privilege is required.
37

STANDARDS

39       None.
40

HISTORY

42       SVr4.
43
44       Starting with glibc 2.31, this function is no longer available to newly
45       linked applications and is no longer declared in <time.h>.
46

SEE ALSO

48       date(1), settimeofday(2), capabilities(7)
49
50
51
52Linux man-pages 6.05              2023-03-30                          stime(2)
Impressum