]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
fea681da MK |
4 | .\" Permission is granted to make and distribute verbatim copies of this |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
c13182ef | 12 | .\" |
fea681da MK |
13 | .\" Since the Linux kernel and libraries are constantly changing, this |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
c13182ef | 20 | .\" |
fea681da MK |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
fea681da MK |
24 | .\" |
25 | .\" Modified by Michael Haardt <michael@moria.de> | |
26 | .\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu> | |
27 | .\" Modified 2001-03-16 by Andries Brouwer <aeb@cwi.nl> | |
c11b1abf | 28 | .\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com> |
fea681da | 29 | .\" |
97986708 | 30 | .TH STIME 2 2016-03-15 "Linux" "Linux Programmer's Manual" |
fea681da MK |
31 | .SH NAME |
32 | stime \- set time | |
33 | .SH SYNOPSIS | |
fea681da | 34 | .B #include <time.h> |
68e4db0a | 35 | .PP |
cecb112e | 36 | .BI "int stime(const time_t *" t ); |
68e4db0a | 37 | .PP |
cc4615cc MK |
38 | .in -4n |
39 | Feature Test Macro Requirements for glibc (see | |
40 | .BR feature_test_macros (7)): | |
41 | .in | |
68e4db0a | 42 | .PP |
cc4615cc | 43 | .BR stime (): |
51c612fb MK |
44 | Since glibc 2.19: |
45 | _DEFAULT_SOURCE | |
46 | Glibc 2.19 and earlier: | |
47 | _SVID_SOURCE | |
fea681da | 48 | .SH DESCRIPTION |
60a90ecd MK |
49 | .BR stime () |
50 | sets the system's idea of the time and date. | |
f49c451a | 51 | The time, pointed |
ef2e0660 MK |
52 | to by \fIt\fP, is measured in seconds since the |
53 | Epoch, 1970-01-01 00:00:00 +0000 (UTC). | |
60a90ecd | 54 | .BR stime () |
33a0ccb2 | 55 | may be executed only by the superuser. |
47297adb | 56 | .SH RETURN VALUE |
c13182ef MK |
57 | On success, zero is returned. |
58 | On error, \-1 is returned, and | |
fea681da MK |
59 | .I errno |
60 | is set appropriately. | |
61 | .SH ERRORS | |
62 | .TP | |
63 | .B EFAULT | |
64 | Error in getting information from user space. | |
65 | .TP | |
66 | .B EPERM | |
67 | The calling process has insufficient privilege. | |
eb9a0b2f | 68 | Under Linux, the |
fea681da MK |
69 | .B CAP_SYS_TIME |
70 | privilege is required. | |
47297adb | 71 | .SH CONFORMING TO |
97c1eac8 | 72 | SVr4. |
47297adb | 73 | .SH SEE ALSO |
fea681da MK |
74 | .BR date (1), |
75 | .BR settimeofday (2), | |
cc4615cc | 76 | .BR capabilities (7) |