1TIME(2)                    Linux Programmer's Manual                   TIME(2)
2
3
4

NAME

6       time - get time in seconds
7

SYNOPSIS

9       #include <time.h>
10
11       time_t time(time_t *t);
12

DESCRIPTION

14       time()  returns  the  time  as  the  number of seconds since the Epoch,
15       1970-01-01 00:00:00 +0000 (UTC).
16
17       If t is non-NULL, the return value is also stored in the memory pointed
18       to by t.
19

RETURN VALUE

21       On  success,  the value of time in seconds since the Epoch is returned.
22       On error, ((time_t) -1) is returned, and errno is set appropriately.
23

ERRORS

25       EFAULT t points outside your accessible address space.
26

CONFORMING TO

28       SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX does not specify any error
29       conditions.
30

NOTES

32       POSIX.1 defines seconds since the Epoch as a value to be interpreted as
33       the number of seconds between a specified time and the Epoch, according
34       to  a  formula  for conversion from UTC equivalent to conversion on the
35       naive basis that leap seconds are ignored and all years divisible by  4
36       are  leap  years.   This  value is not the same as the actual number of
37       seconds between the time and the Epoch, because  of  leap  seconds  and
38       because clocks are not required to be synchronized to a standard refer‐
39       ence.  The intention is that the interpretation of  seconds  since  the
40       Epoch  values  be  consistent;  see  POSIX.1  Annex B 2.2.2 for further
41       rationale.
42

SEE ALSO

44       date(1), gettimeofday(2), ctime(3), ftime(3), time(7)
45

COLOPHON

47       This page is part of release 3.25 of the Linux  man-pages  project.   A
48       description  of  the project, and information about reporting bugs, can
49       be found at http://www.kernel.org/doc/man-pages/.
50
51
52
53Linux                             2010-02-25                           TIME(2)
Impressum