Deleted Added
full compact
gettimeofday.2 (22134) gettimeofday.2 (23660)
1.\" Copyright (c) 1980, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 15 unchanged lines hidden (view full) ---

24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
1.\" Copyright (c) 1980, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 15 unchanged lines hidden (view full) ---

24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)gettimeofday.2 8.1 (Berkeley) 6/4/93
32.\" @(#)gettimeofday.2 8.2 (Berkeley) 5/26/95
33.\"
33.\"
34.Dd June 4, 1993
34.Dd May 26, 1995
35.Dt GETTIMEOFDAY 2
36.Os BSD 4
37.Sh NAME
38.Nm gettimeofday ,
39.Nm settimeofday
40.Nd get/set date and time
41.Sh SYNOPSIS
42.Fd #include <sys/time.h>

--- 45 unchanged lines hidden (view full) ---

88.Fa timezone
89structure indicates the local time zone
90(measured in minutes of time westward from Greenwich),
91and a flag that, if nonzero, indicates that
92Daylight Saving time applies locally during
93the appropriate part of the year.
94.Pp
95Only the super-user may set the time of day or time zone.
35.Dt GETTIMEOFDAY 2
36.Os BSD 4
37.Sh NAME
38.Nm gettimeofday ,
39.Nm settimeofday
40.Nd get/set date and time
41.Sh SYNOPSIS
42.Fd #include <sys/time.h>

--- 45 unchanged lines hidden (view full) ---

88.Fa timezone
89structure indicates the local time zone
90(measured in minutes of time westward from Greenwich),
91and a flag that, if nonzero, indicates that
92Daylight Saving time applies locally during
93the appropriate part of the year.
94.Pp
95Only the super-user may set the time of day or time zone.
96If the system is running in secure mode (see
97.Xr init 8 ),
98the time may only be advanced.
99This limitation is imposed to prevent a malicious super-user
100from setting arbitrary time stamps on files.
101The system time can still be adjusted backwards using the
102.Xr adjtime 2
103system call even when the system is secure.
96.Sh RETURN
97A 0 return value indicates that the call succeeded.
98A -1 return value indicates an error occurred, and in this
99case an error code is stored into the global variable
100.Va errno .
101.Sh ERRORS
102The following error codes may be set in
103.Va errno :

--- 17 unchanged lines hidden ---
104.Sh RETURN
105A 0 return value indicates that the call succeeded.
106A -1 return value indicates an error occurred, and in this
107case an error code is stored into the global variable
108.Va errno .
109.Sh ERRORS
110The following error codes may be set in
111.Va errno :

--- 17 unchanged lines hidden ---