Debian Codegraph @

upstream/debian-trixie/man2/stime.2

raw
1 .\" Copyright (c) 1992 Drew Eckhardt ([email protected]), March 28, 1992
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .\" Modified by Michael Haardt <[email protected]>
6 .\" Modified 1993-07-24 by Rik Faith <[email protected]>
7 .\" Modified 2001-03-16 by Andries Brouwer <[email protected]>
8 .\" Modified 2004-05-27 by Michael Kerrisk <[email protected]>
9 .\"
10 .TH stime 2 2024-05-02 "Linux man-pages 6.9.1"
11 .SH NAME
12 stime \- set time
13 .SH SYNOPSIS
14 .nf
15 .B #include <time.h>
16 .P
17 .BI "[[deprecated]] int stime(const time_t *" t );
18 .fi
19 .P
20 .RS -4
21 Feature Test Macro Requirements for glibc (see
22 .BR feature_test_macros (7)):
23 .RE
24 .P
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 .P
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 None.
63 .SH HISTORY
64 SVr4.
65 .P
66 Starting with glibc 2.31,
67 this function is no longer available to newly linked applications
68 and is no longer declared in
69 .IR <time.h> .
70 .SH SEE ALSO
71 .BR date (1),
72 .BR settimeofday (2),
73 .BR capabilities (7)