]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/stime.2
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man2 / stime.2
1 .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .\" Modified by Michael Haardt <michael@moria.de>
6 .\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
7 .\" Modified 2001-03-16 by Andries Brouwer <aeb@cwi.nl>
8 .\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
9 .\"
10 .TH STIME 2 2021-03-22 "Linux man-pages (unreleased)"
11 .SH NAME
12 stime \- set time
13 .SH SYNOPSIS
14 .nf
15 .B #include <time.h>
16 .PP
17 .BI "int stime(const time_t *" t );
18 .fi
19 .PP
20 .RS -4
21 Feature Test Macro Requirements for glibc (see
22 .BR feature_test_macros (7)):
23 .RE
24 .PP
25 .BR stime ():
26 .nf
27 Since glibc 2.19:
28 _DEFAULT_SOURCE
29 Glibc 2.19 and earlier:
30 _SVID_SOURCE
31 .fi
32 .SH DESCRIPTION
33 .BR NOTE :
34 This function is deprecated;
35 use
36 .BR clock_settime (2)
37 instead.
38 .PP
39 .BR stime ()
40 sets the system's idea of the time and date.
41 The time, pointed
42 to by \fIt\fP, is measured in seconds since the
43 Epoch, 1970-01-01 00:00:00 +0000 (UTC).
44 .BR stime ()
45 may be executed only by the superuser.
46 .SH RETURN VALUE
47 On success, zero is returned.
48 On error, \-1 is returned, and
49 .I errno
50 is set to indicate the error.
51 .SH ERRORS
52 .TP
53 .B EFAULT
54 Error in getting information from user space.
55 .TP
56 .B EPERM
57 The calling process has insufficient privilege.
58 Under Linux, the
59 .B CAP_SYS_TIME
60 privilege is required.
61 .SH STANDARDS
62 SVr4.
63 .SH NOTES
64 Starting with glibc 2.31,
65 this function is no longer available to newly linked applications
66 and is no longer declared in
67 .IR <time.h> .
68 .SH SEE ALSO
69 .BR date (1),
70 .BR settimeofday (2),
71 .BR capabilities (7)