1 .\" Copyright (c) 1980 Regents of the University of California.
2 .\" All rights reserved. The Berkeley software License Agreement
3 .\" specifies the terms and conditions for redistribution.
5 .\" @(#)gettimeofday.2 6.7 (Berkeley) 5/14/86
7 .TH TIME 2 "May 14, 1986"
10 time, stime \- get/set date and time
14 #include <sys/types.h>
17 time_t time(time_t *\fItp\fP)
18 int stime(time_t *\fItp\fP)
21 The system's notion of the current Greenwich time
24 call, and set with the
28 in seconds since midnight (0 hour), January 1, 1970.
29 The time is both returned by
31 and stored in the variable pointed to by
38 obtains the time to set from the variable pointed to by
41 Only the super-user may set the time of day.
45 indicates that the call succeeded.
47 returns the current time on success.
48 A \-1 return value indicates an error occurred, and in this
49 case an error code is stored into the global variable \fBerrno\fP.
51 The following error codes may be set in \fBerrno\fP:
56 address referenced invalid memory.
59 A user other than the super-user attempted to set the time.