1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Modified by Michael Haardt <michael@moria.de>
26 .\" Modified Sat Jul 24 14:13:40 1993 by Rik Faith <faith@cs.unc.edu>
27 .\" Additions by Joseph S. Myers <jsm28@cam.ac.uk>, 970909
29 .TH TIME 2 2010-02-25 "Linux" "Linux Programmer's Manual"
31 time \- get time in seconds
35 .BI "time_t time(time_t *" t );
38 returns the time as the number of seconds since the
39 Epoch, 1970-01-01 00:00:00 +0000 (UTC).
44 the return value is also stored in the memory pointed to by
47 On success, the value of time in seconds since the Epoch is returned.
48 On error, \fI((time_t)\ \-1)\fP is returned, and \fIerrno\fP is set
54 points outside your accessible address space.
56 SVr4, 4.3BSD, C89, C99, POSIX.1-2001.
58 .\" Under 4.3BSD, this call is obsoleted by
59 .\" .BR gettimeofday (2).
60 POSIX does not specify any error conditions.
63 .I seconds since the Epoch
64 as a value to be interpreted as the number of seconds between a
65 specified time and the Epoch, according to a formula for conversion
66 from UTC equivalent to conversion on the naive basis that leap
67 seconds are ignored and all years divisible by 4 are leap years.
68 This value is not the same as the actual number of seconds between the time
69 and the Epoch, because of leap seconds and because clocks are not
70 required to be synchronized to a standard reference.
72 that the interpretation of seconds since the Epoch values be
73 consistent; see POSIX.1 Annex B 2.2.2 for further rationale.