* [PATCH] time.2: wfix regarding year-2038
@ 2021-07-24 15:52 Viet Than
2021-07-24 16:39 ` Jakub Wilk
0 siblings, 1 reply; 4+ messages in thread
From: Viet Than @ 2021-07-24 15:52 UTC (permalink / raw)
To: linux-man; +Cc: mtk.manpages, alx.manpages
Hi,
The old description led me to believe 2038-01-19 03:14:08 UTC==2**31
therefore would still be valid, and that undefined behavior would
begin from 2038-01-19 03:14:09 UTC.
Searched up to be sure.
Modified wording to be more precise.
Signed-off-by: Viet Than <thanhoangviet@gmail.com>
---
man2/time.2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man2/time.2 b/man2/time.2
index 059222dcd..f15dfa325 100644
--- a/man2/time.2
+++ b/man2/time.2
@@ -94,7 +94,7 @@ specified as NULL cannot fail with the error
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).
+(occurs when past 2038-01-19 03:14:07 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
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] time.2: wfix regarding year-2038
2021-07-24 15:52 [PATCH] time.2: wfix regarding year-2038 Viet Than
@ 2021-07-24 16:39 ` Jakub Wilk
2021-07-24 23:51 ` [PATCH v2] " Viet Than
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Wilk @ 2021-07-24 16:39 UTC (permalink / raw)
To: Viet Than; +Cc: linux-man, Michael Kerrisk, Alejandro Colomar
* Viet Than <thanhoangviet@gmail.com>, 2021-07-24, 11:52:
>The old description led me to believe 2038-01-19 03:14:08 UTC==2**31
This is correct.
>therefore would still be valid,
No, 2**31 is the first value that doesn't fit 32-bit 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).
I suppose this should say "...the clock reaches the time 2**31",
and then we can keep the parenthetical as is.
--
Jakub Wilk
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] time.2: wfix regarding year-2038
2021-07-24 16:39 ` Jakub Wilk
@ 2021-07-24 23:51 ` Viet Than
2021-07-26 10:16 ` Alejandro Colomar (man-pages)
0 siblings, 1 reply; 4+ messages in thread
From: Viet Than @ 2021-07-24 23:51 UTC (permalink / raw)
To: Jakub Wilk; +Cc: linux-man, Michael Kerrisk, Alejandro Colomar
> I suppose this should say "...the clock reaches the time 2**31",
> and then we can keep the parenthetical as is.
Thanks for the insight! here's the new patch
Cc: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Viet Than <thanhoangviet@gmail.com>
---
man2/time.2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man2/time.2 b/man2/time.2
index 059222dcd..a7410bfc8 100644
--- a/man2/time.2
+++ b/man2/time.2
@@ -93,7 +93,7 @@ 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
+is a signed 32-bit integer and the clock reaches at or beyond the time 2**31
(2038-01-19 03:14:08 UTC, ignoring leap seconds).
(POSIX.1 permits, but does not require, the
.B EOVERFLOW
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] time.2: wfix regarding year-2038
2021-07-24 23:51 ` [PATCH v2] " Viet Than
@ 2021-07-26 10:16 ` Alejandro Colomar (man-pages)
0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-07-26 10:16 UTC (permalink / raw)
To: Viet Than, Jakub Wilk; +Cc: linux-man, Michael Kerrisk
Hi Viet, Jakub,
On 7/25/21 1:51 AM, Viet Than wrote:
>> I suppose this should say "...the clock reaches the time 2**31",
>> and then we can keep the parenthetical as is.
> Thanks for the insight! here's the new patch
Thanks for the review, Jakub!
>
> Cc: Jakub Wilk <jwilk@jwilk.net>
> Signed-off-by: Viet Than <thanhoangviet@gmail.com>
>
Patch applied (manually as it was corrupt).
Thanks,
Alex
> ---
> man2/time.2 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man2/time.2 b/man2/time.2
> index 059222dcd..a7410bfc8 100644
> --- a/man2/time.2
> +++ b/man2/time.2
> @@ -93,7 +93,7 @@ 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
> +is a signed 32-bit integer and the clock reaches at or beyond the time 2**31
> (2038-01-19 03:14:08 UTC, ignoring leap seconds).
> (POSIX.1 permits, but does not require, the
> .B EOVERFLOW
>
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-26 10:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-24 15:52 [PATCH] time.2: wfix regarding year-2038 Viet Than
2021-07-24 16:39 ` Jakub Wilk
2021-07-24 23:51 ` [PATCH v2] " Viet Than
2021-07-26 10:16 ` Alejandro Colomar (man-pages)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).