Re: End of Time, *nix Time

Jeff Lightner via Ale <[email protected]> Tue, 28 Apr 2026 09:07:52 -0400
Newsgroups gmane.org.user-groups.ale
Message-ID <[email protected]>
This is a multipart message in MIME format.

--===============1600215820348154873==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0015_01DCD6EE.7FB23C20"
Content-Language: en-us

This is a multipart message in MIME format.

------=_NextPart_000_0015_01DCD6EE.7FB23C20
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

For a more positive outlook remember what every prospectus says:
=E2=80=9CPast performance is no guarantee of future results.=E2=80=9D

=20

From: Ale <[email protected]> On Behalf Of Jon "maddog" Hall via Ale
Sent: Tuesday, April 28, 2026 8:26 AM
To: Bob Toxen <transam-z5aK1Qzqv/r5/[email protected]>; Atlanta Linux Enthusiasts =
<[email protected]>
Cc: Jon "maddog" Hall <[email protected]>
Subject: Re: [ale] End of Time, *nix Time

=20

Quite frankly at the age of 75, diabetic,  three heart attacks and only =
26% of my heart capacity left I do not think I have to worry about this.

=20

But it was fun reading about it anyway.=F0=9F=98=9C

=20

On Sat, Apr 25, 2026, 23:54 Bob Toxen via Ale <[email protected] =
<mailto:[email protected]> > wrote:

I've just uploaded the new and improved code to my web site so please
download again and email just me ([email protected] =
<mailto:[email protected]> ) if you
get any more compiler warnings or strange results to be addressed.

This new version improves the messages to be less cryptinc but the
program does assume you know something about how time is handled in
*nix.  The short answer is that if you have the old signed 32-bit
time_t type then the largest year you will see will be 2038 in
output of the form "Day-of-week Month Day ##:##:## Year".

If you get a reference from Hitchhiker's Guide to the Galaxy then
you have the new 64-bit time_t type and you should be good for the
next two billion years.

Please send me comments to address.

Bob

On Sat, Apr 25, 2026 at 02:38:03PM -0400, Jeff Lightner via Ale wrote:
> This made me think of my annoyance at logs for some apps that did
> epoch timestamps.  More than once I wrote a script to calculate human
> readable time as it displayed lines from such logs.  I???m sure there
> are some who can eyeball epoch and convert it mentally to star date =
and
> other clock/calendar systems but I wasn???t one of them.  > Which also
> made me think of the fact that some logs are in UTC rather than local
> time zone time.  At least I could do that conversion in my head.

> Back when we tested for Y2K bugs many of us who were UNIX admins
> also tested for future dates against the 32 bit limit and other =
factors.
> I often thought it odd that most UNIX platforms already did 64 bit =
whereas
> many Linux distros didn???t even if they were on a 64 bit processor.

> From: Ale <[email protected] <mailto:[email protected]> > On =
Behalf Of Ron via Ale
> Sent: Saturday, April 25, 2026 1:29 PM
> To: [email protected] <mailto:[email protected]>=20
> Cc: Ron <[email protected] <mailto:[email protected]> >
> Subject: Re: [ale] End of Time, *nix Time
>=20
> =20
>=20
> Bob Toxen via Ale wrote on 2026-04-24 19:43:
>=20
>   # Download this program:
>   wget http://verysecurelinux.com/xtime.c
>   # Compile:
>   make xtime
>   # Run:
>   ./xtime -q
>=20
> I downloaded an compiled this.
>=20
> Lots of warnings when running `make`, but it compiled.
>=20
> What am I to make of the output? I can make no sense of it.
>=20
> =20
>=20
> $ ./xtime -q
> Copyright (c) Bob Toxen 2026.  All rights reserved.
>=20
> This program will analyze your *nix for the well-known bug if the
> seconds since 01/01/1970 exceeds a signed 32 bit (4-byte) integer.
> If it outputs abnormal output for years beyond 2038 then your computer
> will fail at that time, about 12 years from now.
>=20
> Many *nix systems were fixed decades ago so that this variable became
> an unsigned 32-bit int, which can keep time until 2106.
> More recently most systems went to a signed 64-bit int.
>=20
> Note that most Unix and Linux distributions corrected the time
> problem by approximately 2014 to work until 2106 (using an unsigned
> 32-bit number) or well beyond if using a 64-bit number but maybe the =
code
> will fail before the largest 64-bit signed (292,271,022,989 years)
> or unsigned number is exceeded.
>=20
>=20
> If it is not fixed in your version, well, good luck.
>=20
> sizeof char=3D1, sizeof short=3D2, sizeof int=3D4, sizeof long=3D8, =
sizeof long long=3D8, sizeof time_t=3D8
>=20
> Current years and seconds since the epoch: 56 1777137911
>   seconds/year:31536000, seconds/year including leap year:31557600, =
delta seconds:21600, delta hours:6
>=20
> Biggest   signed 4-byte long: years inc=3D            0, years in the =
future=3D           11, Mon Jan 18 19:14:07 2038
> Biggest unsigned 4-byte long: years inc=3D            0, years in the =
future=3D           79, Sat Feb  6 22:28:15 2106
>=20
> Time: years inc=3D            1, years in the future=3D   2147437525, =
Wed Jun 12 15:25:11 2147483647
>=20
> Welcome to the Restaurant at the end of the universe.  Hello, your =
Majesty.
>=20
> Biggest   signed 8-byte long: years inc=3D            0, years in the =
future=3D 292271022988,
> ERROR: Invalid seconds since Epoch in localtime
> Error code: Value too large for defined data type
>=20
> Biggest unsigned 8-byte long: years inc=3D            0, years in the =
future=3D          -56, Wed Dec 31 15:59:59 1969
>=20
> =20
>=20

> _______________________________________________
> Ale mailing list
> [email protected] <mailto:[email protected]>=20
> https://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo

_______________________________________________
Ale mailing list
[email protected] <mailto:[email protected]>=20
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo


------=_NextPart_000_0015_01DCD6EE.7FB23C20
Content-Type: text/html;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 15 (filtered =
medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Aptos;}
@font-face
	{font-family:"Segoe UI Emoji";
	panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	font-size:12.0pt;
	font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
span.EmailStyle19
	{mso-style-type:personal-reply;
	font-family:"Aptos",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple style=3D'word-wrap:break-word'><div =
class=3DWordSection1><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt'>For a more positive outlook remember what =
every prospectus says:<br>=E2=80=9CPast performance is no guarantee of =
future results.=E2=80=9D<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><div =
style=3D'border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in =
0in 0in'><p class=3DMsoNormal><b><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span><=
/b><span style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'> =
Ale &lt;[email protected]&gt; <b>On Behalf Of </b>Jon =
&quot;maddog&quot; Hall via Ale<br><b>Sent:</b> Tuesday, April 28, 2026 =
8:26 AM<br><b>To:</b> Bob Toxen &lt;transam-z5aK1Qzqv/r5/[email protected]&gt;; =
Atlanta Linux Enthusiasts &lt;[email protected]&gt;<br><b>Cc:</b> Jon =
&quot;maddog&quot; Hall =
&lt;[email protected]&gt;<br><b>Subject:</b> Re: [ale] End of =
Time, *nix Time<o:p></o:p></span></p></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><p class=3DMsoNormal>Quite =
frankly at the age of 75, diabetic,&nbsp; three heart attacks and only =
26% of my heart capacity left I do not think I have to worry about =
this.<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>But it was fun reading about it anyway.<span =
style=3D'font-family:"Segoe UI =
Emoji",sans-serif'>&#128540;</span><o:p></o:p></p></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=3DMsoNormal>On =
Sat, Apr 25, 2026, 23:54 Bob Toxen via Ale &lt;<a =
href=3D"mailto:[email protected]">[email protected]</a>&gt; =
wrote:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><p class=3DMsoNormal>I've just =
uploaded the new and improved code to my web site so please<br>download =
again and email just me (<a =
href=3D"mailto:[email protected]">[email protected]</=
a>) if you<br>get any more compiler warnings or strange results to be =
addressed.<br><br>This new version improves the messages to be less =
cryptinc but the<br>program does assume you know something about how =
time is handled in<br>*nix.&nbsp; The short answer is that if you have =
the old signed 32-bit<br>time_t type then the largest year you will see =
will be 2038 in<br>output of the form &quot;Day-of-week Month Day =
##:##:## Year&quot;.<br><br>If you get a reference from Hitchhiker's =
Guide to the Galaxy then<br>you have the new 64-bit time_t type and you =
should be good for the<br>next two billion years.<br><br>Please send me =
comments to address.<br><br>Bob<br><br>On Sat, Apr 25, 2026 at =
02:38:03PM -0400, Jeff Lightner via Ale wrote:<br>&gt; This made me =
think of my annoyance at logs for some apps that did<br>&gt; epoch =
timestamps.&nbsp; More than once I wrote a script to calculate =
human<br>&gt; readable time as it displayed lines from such logs.&nbsp; =
I???m sure there<br>&gt; are some who can eyeball epoch and convert it =
mentally to star date and<br>&gt; other clock/calendar systems but I =
wasn???t one of them.&nbsp; &gt; Which also<br>&gt; made me think of the =
fact that some logs are in UTC rather than local<br>&gt; time zone =
time.&nbsp; At least I could do that conversion in my head.<br><br>&gt; =
Back when we tested for Y2K bugs many of us who were UNIX admins<br>&gt; =
also tested for future dates against the 32 bit limit and other =
factors.<br>&gt; I often thought it odd that most UNIX platforms already =
did 64 bit whereas<br>&gt; many Linux distros didn???t even if they were =
on a 64 bit processor.<br><br>&gt; From: Ale &lt;<a =
href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a>&gt; On Behalf Of Ron via =
Ale<br>&gt; Sent: Saturday, April 25, 2026 1:29 PM<br>&gt; To: <a =
href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a><br>&gt; =
Cc: Ron &lt;<a href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a>&gt;<br>&gt; Subject: Re: [ale] End of =
Time, *nix Time<br>&gt; <br>&gt;&nbsp; <br>&gt; <br>&gt; Bob Toxen via =
Ale wrote on 2026-04-24 19:43:<br>&gt; <br>&gt;&nbsp; &nbsp;# Download =
this program:<br>&gt;&nbsp; &nbsp;wget <a =
href=3D"http://verysecurelinux.com/xtime.c" =
target=3D"_blank">http://verysecurelinux.com/xtime.c</a><br>&gt;&nbsp; =
&nbsp;# Compile:<br>&gt;&nbsp; &nbsp;make xtime<br>&gt;&nbsp; &nbsp;# =
Run:<br>&gt;&nbsp; &nbsp;./xtime -q<br>&gt; <br>&gt; I downloaded an =
compiled this.<br>&gt; <br>&gt; Lots of warnings when running `make`, =
but it compiled.<br>&gt; <br>&gt; What am I to make of the output? I can =
make no sense of it.<br>&gt; <br>&gt;&nbsp; <br>&gt; <br>&gt; $ ./xtime =
-q<br>&gt; Copyright (c) Bob Toxen 2026.&nbsp; All rights =
reserved.<br>&gt; <br>&gt; This program will analyze your *nix for the =
well-known bug if the<br>&gt; seconds since 01/01/1970 exceeds a signed =
32 bit (4-byte) integer.<br>&gt; If it outputs abnormal output for years =
beyond 2038 then your computer<br>&gt; will fail at that time, about 12 =
years from now.<br>&gt; <br>&gt; Many *nix systems were fixed decades =
ago so that this variable became<br>&gt; an unsigned 32-bit int, which =
can keep time until 2106.<br>&gt; More recently most systems went to a =
signed 64-bit int.<br>&gt; <br>&gt; Note that most Unix and Linux =
distributions corrected the time<br>&gt; problem by approximately 2014 =
to work until 2106 (using an unsigned<br>&gt; 32-bit number) or well =
beyond if using a 64-bit number but maybe the code<br>&gt; will fail =
before the largest 64-bit signed (292,271,022,989 years)<br>&gt; or =
unsigned number is exceeded.<br>&gt; <br>&gt; <br>&gt; If it is not =
fixed in your version, well, good luck.<br>&gt; <br>&gt; sizeof =
char=3D1, sizeof short=3D2, sizeof int=3D4, sizeof long=3D8, sizeof long =
long=3D8, sizeof time_t=3D8<br>&gt; <br>&gt; Current years and seconds =
since the epoch: 56 1777137911<br>&gt;&nbsp; =
&nbsp;seconds/year:31536000, seconds/year including leap year:31557600, =
delta seconds:21600, delta hours:6<br>&gt; <br>&gt; Biggest&nbsp; =
&nbsp;signed 4-byte long: years inc=3D&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; 0, years in the future=3D&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp;11, Mon Jan 18 19:14:07 2038<br>&gt; Biggest unsigned 4-byte long: =
years inc=3D&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0, years in the =
future=3D&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;79, Sat Feb&nbsp; 6 =
22:28:15 2106<br>&gt; <br>&gt; Time: years inc=3D&nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; 1, years in the future=3D&nbsp; &nbsp;2147437525, =
Wed Jun 12 15:25:11 2147483647<br>&gt; <br>&gt; Welcome to the =
Restaurant at the end of the universe.&nbsp; Hello, your =
Majesty.<br>&gt; <br>&gt; Biggest&nbsp; &nbsp;signed 8-byte long: years =
inc=3D&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0, years in the =
future=3D 292271022988,<br>&gt; ERROR: Invalid seconds since Epoch in =
localtime<br>&gt; Error code: Value too large for defined data =
type<br>&gt; <br>&gt; Biggest unsigned 8-byte long: years inc=3D&nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0, years in the future=3D&nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; -56, Wed Dec 31 15:59:59 1969<br>&gt; =
<br>&gt;&nbsp; <br>&gt; <br><br>&gt; =
_______________________________________________<br>&gt; Ale mailing =
list<br>&gt; <a href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a><br>&gt; <a =
href=3D"https://mail.ale.org/mailman/listinfo/ale" =
target=3D"_blank">https://mail.ale.org/mailman/listinfo/ale</a><br>&gt; =
See JOBS, ANNOUNCE and SCHOOLS lists at<br>&gt; <a =
href=3D"http://mail.ale.org/mailman/listinfo" =
target=3D"_blank">http://mail.ale.org/mailman/listinfo</a><br><br>_______=
________________________________________<br>Ale mailing list<br><a =
href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a><br><a =
href=3D"https://mail.ale.org/mailman/listinfo/ale" =
target=3D"_blank">https://mail.ale.org/mailman/listinfo/ale</a><br>See =
JOBS, ANNOUNCE and SCHOOLS lists at<br><a =
href=3D"http://mail.ale.org/mailman/listinfo" =
target=3D"_blank">http://mail.ale.org/mailman/listinfo</a><o:p></o:p></p>=
</blockquote></div></div></body></html>
------=_NextPart_000_0015_01DCD6EE.7FB23C20--


--===============1600215820348154873==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ale mailing list
[email protected]
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo

--===============1600215820348154873==--