]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/stime.2
Convert function formatting of the form "\fBname\fP()" to ".BR name ()".
[thirdparty/man-pages.git] / man2 / stime.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
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>
28 .\" Modified 2004-05-27 by Michael Kerrisk <mtk-manpages@gmx.net>
29 .\"
30 .TH STIME 2 2004-05-27 "Linux 2.6.6" "Linux Programmer's Manual"
31 .SH NAME
32 stime \- set time
33 .SH SYNOPSIS
34 .BR "#define _SVID_SOURCE" " /* glibc2 needs this */"
35 .br
36 .B #include <time.h>
37 .sp
38 .BI "int stime(time_t *" t );
39 .SH DESCRIPTION
40 .BR stime ()
41 sets the system's idea of the time and date.
42 Time, pointed
43 to by \fIt\fP, is measured in seconds from 00:00:00 GMT January 1, 1970.
44 .BR stime ()
45 may only be executed 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 appropriately.
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 "CONFORMING TO"
62 SVr4.
63 .SH NOTES
64 Under glibc2,
65 .I <time.h>
66 only provides a prototype when
67 .B _SVID_SOURCE
68 is defined.
69 .SH "SEE ALSO"
70 .BR date (1),
71 .BR settimeofday (2),
72 .BR capabilities (7),
73 .BR feature_test_macros (7)