Document that the time zone is obselete, add an xref to localtime(3), and
update the HISTORY section.
This commit is contained in:
parent
7227af1293
commit
7348dd86b1
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: gettimeofday.2,v 1.8 1997/04/26 21:25:49 tls Exp $
|
||||
.\" $NetBSD: gettimeofday.2,v 1.9 1997/10/09 05:05:56 mycroft Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -48,12 +48,13 @@
|
|||
.Fn settimeofday "const struct timeval *tp" "const struct timezone *tzp"
|
||||
.Sh DESCRIPTION
|
||||
.Bf -symbolic
|
||||
Note: timezone is no longer used; this information is kept outside
|
||||
the kernel.
|
||||
Note: time zone information is no longer provided by this interface.
|
||||
See
|
||||
.Xr localtime 3
|
||||
for information on how to retrieve it.
|
||||
.Ef
|
||||
.Pp
|
||||
The system's notion of the current Greenwich time and the current time
|
||||
zone is obtained with the
|
||||
The system's notion of the current UTC time is obtained with the
|
||||
.Fn gettimeofday
|
||||
call, and set with the
|
||||
.Fn settimeofday
|
||||
|
@ -62,10 +63,7 @@ since midnight (0 hour), January 1, 1970. The resolution of the system
|
|||
clock is hardware dependent, and the time may be updated continuously or
|
||||
in ``ticks.'' If
|
||||
.Fa tp
|
||||
or
|
||||
.Fa tzp
|
||||
is NULL, the associated time
|
||||
information will not be returned or set.
|
||||
is NULL, the time will not be returned or set.
|
||||
.Pp
|
||||
The structures pointed to by
|
||||
.Fa tp
|
||||
|
@ -89,13 +87,13 @@ struct timezone {
|
|||
.Pp
|
||||
The
|
||||
.Fa timezone
|
||||
structure indicates the local time zone
|
||||
(measured in minutes of time westward from Greenwich),
|
||||
and a flag that, if nonzero, indicates that
|
||||
Daylight Saving time applies locally during
|
||||
the appropriate part of the year.
|
||||
structure is provided only for source compatibility. It is ignored by
|
||||
.Fn settimeofday ,
|
||||
and
|
||||
.Fn gettimeofday
|
||||
will always return zeroes.
|
||||
.Pp
|
||||
Only the super-user may set the time of day or time zone.
|
||||
Only the super-user may set the time of day.
|
||||
.Sh RETURN
|
||||
A 0 return value indicates that the call succeeded.
|
||||
A -1 return value indicates an error occurred, and in this
|
||||
|
@ -116,9 +114,15 @@ security level.
|
|||
.Xr date 1 ,
|
||||
.Xr adjtime 2 ,
|
||||
.Xr ctime 3 ,
|
||||
.Xr localtime 3 ,
|
||||
.Xr timed 8
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Fn gettimeofday
|
||||
function call appeared in
|
||||
.Bx 4.2 .
|
||||
The
|
||||
.Fa tzp
|
||||
argument was deprecated in
|
||||
.Bx 4.4
|
||||
(and many other systems).
|
||||
|
|
Loading…
Reference in New Issue