time.2: NOTES: Fix description of "Seconds since the Epoch"

Reported-by: Alexander Schuch <Alex.Schuch@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2011-09-10 04:33:56 +02:00
parent 23b903297e
commit a2f4e5a8ba
1 changed files with 11 additions and 9 deletions

View File

@ -26,7 +26,7 @@
.\" Modified Sat Jul 24 14:13:40 1993 by Rik Faith <faith@cs.unc.edu> .\" Modified Sat Jul 24 14:13:40 1993 by Rik Faith <faith@cs.unc.edu>
.\" Additions by Joseph S. Myers <jsm28@cam.ac.uk>, 970909 .\" Additions by Joseph S. Myers <jsm28@cam.ac.uk>, 970909
.\" .\"
.TH TIME 2 2010-02-25 "Linux" "Linux Programmer's Manual" .TH TIME 2 2011-09-09 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
time \- get time in seconds time \- get time in seconds
.SH SYNOPSIS .SH SYNOPSIS
@ -61,16 +61,18 @@ POSIX does not specify any error conditions.
.SH NOTES .SH NOTES
POSIX.1 defines POSIX.1 defines
.I seconds since the Epoch .I seconds since the Epoch
as a value to be interpreted as the number of seconds between a using a formula that approximates the number of seconds between a
specified time and the Epoch, according to a formula for conversion specified time and the Epoch.
from UTC equivalent to conversion on the naive basis that leap This formula takes account of the facts that
seconds are ignored and all years divisible by 4 are leap years. all years that are evenly divisible by 4 are leap years,
but years that are evenly divisible by 100 are not leap years
unless they are also evenly divisible by 400,
in which case they are leap years.
This value is not the same as the actual number of seconds between the time This value is not the same as the actual number of seconds between the time
and the Epoch, because of leap seconds and because clocks are not and the Epoch, because of leap seconds and because system clocks are not
required to be synchronized to a standard reference. required to be synchronized to a standard reference.
The intention is The intention is that the interpretation of seconds since the Epoch values be
that the interpretation of seconds since the Epoch values be consistent; see POSIX.1-2008 Rationale A.4.15 for further rationale.
consistent; see POSIX.1 Annex B 2.2.2 for further rationale.
.SH "SEE ALSO" .SH "SEE ALSO"
.BR date (1), .BR date (1),
.BR gettimeofday (2), .BR gettimeofday (2),