1STIME(2) Linux Programmer's Manual STIME(2)
2
3
4
6 stime - set time
7
9 #include <time.h>
10
11 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
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
29 On success, zero is returned. On error, -1 is returned, and errno is
30 set to indicate the error.
31
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
39 SVr4.
40
42 Starting with glibc 2.31, this function is no longer available to newly
43 linked applications and is no longer declared in <time.h>.
44
46 date(1), settimeofday(2), capabilities(7)
47
49 This page is part of release 5.13 of the Linux man-pages project. A
50 description of the project, information about reporting bugs, and the
51 latest version of this page, can be found at
52 https://www.kernel.org/doc/man-pages/.
53
54
55
56Linux 2021-03-22 STIME(2)