8815 mega_sas: variable set but not used
[unleashed.git] / usr / src / man / man2 / stime.2
blob458394b7f2131756a358abc11e37b1ba0c5461ba
1 '\" te
2 .\" Copyright 1989 AT&T.  Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH STIME 2 "Mar 22, 2004"
7 .SH NAME
8 stime \- set system time and date
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <unistd.h>
14 \fBint\fR \fBstime\fR(\fBconst time_t *\fR\fItp\fR);
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The \fBstime()\fR function sets the system's idea of the time and date.  The
21 \fItp\fR argument points to the value of time as measured in seconds from
22 00:00:00 UTC January 1, 1970.
23 .SH RETURN VALUES
24 .sp
25 .LP
26 Upon successful completion, \fB0\fR is returned. Otherwise, \fB\(mi1\fR is
27 returned and \fBerrno\fR is set to indicate the error.
28 .SH ERRORS
29 .sp
30 .LP
31 The \fBstime()\fR function will fail if:
32 .sp
33 .ne 2
34 .na
35 \fB\fBEINVAL\fR\fR
36 .ad
37 .RS 10n
38 The \fItp\fR argument points to an invalid (negative) value.
39 .RE
41 .sp
42 .ne 2
43 .na
44 \fB\fBEPERM\fR\fR
45 .ad
46 .RS 10n
47 The {\fBPRIV_SYS_TIME\fR} privilege is not asserted in the effective set of the
48 calling process.
49 .RE
51 .SH SEE ALSO
52 .sp
53 .LP
54 \fBtime\fR(2), \fBprivileges\fR(5)