OSDN Git Service

6eaf03eaa34727a880825848ca73ac03ba5ea3c9
[linuxjm/LDP_man-pages.git] / original / man2 / stime.2
1 .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
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.
12 .\"
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.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
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@gmail.com>
29 .\"
30 .TH STIME 2 2014-05-10 "Linux" "Linux Programmer's Manual"
31 .SH NAME
32 stime \- set time
33 .SH SYNOPSIS
34 .B #include <time.h>
35 .sp
36 .BI "int stime(const time_t *" t );
37 .sp
38 .in -4n
39 Feature Test Macro Requirements for glibc (see
40 .BR feature_test_macros (7)):
41 .in
42 .sp
43 .BR stime ():
44 _SVID_SOURCE
45 .SH DESCRIPTION
46 .BR stime ()
47 sets the system's idea of the time and date.
48 The time, pointed
49 to by \fIt\fP, is measured in seconds since the
50 Epoch, 1970-01-01 00:00:00 +0000 (UTC).
51 .BR stime ()
52 may be executed only by the superuser.
53 .SH RETURN VALUE
54 On success, zero is returned.
55 On error, \-1 is returned, and
56 .I errno
57 is set appropriately.
58 .SH ERRORS
59 .TP
60 .B EFAULT
61 Error in getting information from user space.
62 .TP
63 .B EPERM
64 The calling process has insufficient privilege.
65 Under Linux the
66 .B CAP_SYS_TIME
67 privilege is required.
68 .SH CONFORMING TO
69 SVr4.
70 .SH SEE ALSO
71 .BR date (1),
72 .BR settimeofday (2),
73 .BR capabilities (7)
74 .SH COLOPHON
75 This page is part of release 3.67 of the Linux
76 .I man-pages
77 project.
78 A description of the project,
79 information about reporting bugs,
80 and the latest version of this page,
81 can be found at
82 \%http://www.kernel.org/doc/man\-pages/.