'\"macro stdmacro
.if n .pH g2.ftime @(#)ftime	40.4 of 9/19/89
.nr X
.if \nX=0 .ds x} ftime 2 "XENIX Compatibility Package" "\&"
.if \nX=1 .ds x} ftime 2 "XENIX Compatibility Package"
.if \nX=2 .ds x} ftime 2 "" "\&"
.if \nX=3 .ds x} ftime "" "" "\&"
.TH \*(x}
.SH NAME
\f4ftime\f1 \- gets time and date
.SH SYNOPSIS
\f4cc [flag ...]\fP \f2file\f1 ... \f4-lx [library ...]\fP
.br
\f4#include <sys/times.h>\fP
.PP
\f4ftime(struct timeb *tp)\fP;
.SH DESCRIPTION
\f4ftime\fP returns the time in a structure (see \f4DIAGNOSTICS\fP below).
\f4ftime\f1 will fail if \f4tp\f1 points to an illegal
address [\f4EFAULT\f1].
.SH DIAGNOSTICS
The \f4ftime\f1 entry fills in a structure pointed to by its
argument, as defined by \f4<sys/timeb.h>\f1:
.RS
.ft CW
.nf
/* Structure returned by ftime system call */
.sp .5
struct timeb {
     long time;
     unsigned short millitm;
     short  timezone;
     short  dstflag;
};
.fi
.ft
.RE
.P
Note that the timezone value is a system default timezone
and not the value of the TZ environment variable.
.P
The structure contains the time since the 00:00:00 \f4GMT\fP, January 1,
1970 up to 1000 milliseconds of more-precise interval,
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.
.SH SEE ALSO
\f4stime\f1(2),
\f4ctime\f1(3C),
.SH NOTES
Since \f4ftime\f1 does not return the correct
timezone value, its use is not recommended.
See \f4ctime\f1(3C) for accurate use of the \f4TZ\fP variable.
