mirror of https://github.com/mkerrisk/man-pages
time.2: Describe EOVERFLOW details
Heavily based on text proposed by Paul Eggert. Cowritten-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
da894b18a8
commit
4af94291ae
21
man2/time.2
21
man2/time.2
|
@ -82,6 +82,27 @@ and the Epoch, because of leap seconds and because system clocks are not
|
|||
required to be synchronized to a standard reference.
|
||||
The intention is that the interpretation of seconds since the Epoch values be
|
||||
consistent; see POSIX.1-2008 Rationale A.4.15 for further rationale.
|
||||
|
||||
On Linux, a call to
|
||||
.BR time ()
|
||||
with
|
||||
.I t
|
||||
specified as NULL cannot fail with the error
|
||||
.BR EOVERFLOW ,
|
||||
even on ABIs where
|
||||
.I time_t
|
||||
is a signed 32-bit integer and the clock ticks past the time 2**31
|
||||
(2038-01-19 03:14:08 UTC, ignoring leap seconds).
|
||||
(POSIX.1 permits, but does not require, the
|
||||
.B EOVERFLOW
|
||||
error in the case where the seconds since the Epoch will not fit in
|
||||
.IR time_t .)
|
||||
Instead, the behavior on Linux is undefined when the system time is out of the
|
||||
.I time_t
|
||||
range.
|
||||
Applications intended to run after 2038 should use ABIs with
|
||||
.I time_t
|
||||
wider than 32 bits.
|
||||
.SH BUGS
|
||||
Error returns from this system call are indistinguishable from
|
||||
successful reports that the time is a few seconds
|
||||
|
|
Loading…
Reference in New Issue