Re: End of Time, *nix Time
Ron via Ale <[email protected]> Sat, 25 Apr 2026 10:29:17 -0700
| Newsgroups | gmane.org.user-groups.ale |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============2665928796017872560==
Content-Type: multipart/alternative;
boundary="------------8beGhQM2BA2891X5vcFEMyxP"
Content-Language: en-CA
This is a multi-part message in MIME format.
--------------8beGhQM2BA2891X5vcFEMyxP
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Bob Toxen via Ale wrote on 2026-04-24 19:43:
> # Download this program: wget http://verysecurelinux.com/xtime.c #
> Compile: make xtime # Run: ./xtime -q
I downloaded an compiled this.
Lots of warnings when running `make`, but it compiled.
What am I to make of the output? I can make no sense of it.
$ ./xtime -q
Copyright (c) Bob Toxen 2026. All rights reserved.
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.
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.
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.
If it is not fixed in your version, well, good luck.
sizeof char=1, sizeof short=2, sizeof int=4, sizeof long=8, sizeof long
long=8, sizeof time_t=8
Current years and seconds since the epoch: 56 1777137911
seconds/year:31536000, seconds/year including leap year:31557600,
delta seconds:21600, delta hours:6
Biggest signed 4-byte long: years inc= 0, years in the
future= 11, Mon Jan 18 19:14:07 2038
Biggest unsigned 4-byte long: years inc= 0, years in the
future= 79, Sat Feb 6 22:28:15 2106
Time: years inc= 1, years in the future= 2147437525, Wed Jun
12 15:25:11 2147483647
Welcome to the Restaurant at the end of the universe. Hello, your Majesty.
Biggest signed 8-byte long: years inc= 0, years in the
future= 292271022988,
ERROR: Invalid seconds since Epoch in localtime
Error code: Value too large for defined data type
Biggest unsigned 8-byte long: years inc= 0, years in the
future= -56, Wed Dec 31 15:59:59 1969
--------------8beGhQM2BA2891X5vcFEMyxP
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix"><font face="Tomson Talks">Bob Toxen via
Ale wrote on 2026-04-24 19:43:<br>
</font></div>
<blockquote type="cite"
cite="mid:aewqUpwomeqqj%2F5X-4j1nheBH7sXPlorVDOq/[email protected]">
<pre class="moz-quote-pre" wrap=""><font face="Tomson Talks"> # Download this program:
wget <a class="moz-txt-link-freetext"
href="http://verysecurelinux.com/xtime.c" moz-do-not-send="true">http://verysecurelinux.com/xtime.c</a>
# Compile:
make xtime
# Run:
./xtime -q</font></pre>
</blockquote>
<p><font face="Tomson Talks">I downloaded an compiled this.</font></p>
<p><font face="Tomson Talks">Lots of warnings when running `make`,
but it compiled.</font></p>
<p><font face="Tomson Talks">What am I to make of the output? I can
make no sense of it.</font></p>
<p><font face="Tomson Talks"><br>
</font></p>
<p><font face="monospace">$ ./xtime -q<br>
Copyright (c) Bob Toxen 2026. All rights reserved.<br>
<br>
This program will analyze your *nix for the well-known bug if
the<br>
seconds since 01/01/1970 exceeds a signed 32 bit (4-byte)
integer.<br>
If it outputs abnormal output for years beyond 2038 then your
computer<br>
will fail at that time, about 12 years from now.<br>
<br>
Many *nix systems were fixed decades ago so that this variable
became<br>
an unsigned 32-bit int, which can keep time until 2106.<br>
More recently most systems went to a signed 64-bit int.<br>
<br>
Note that most Unix and Linux distributions corrected the time<br>
problem by approximately 2014 to work until 2106 (using an
unsigned<br>
32-bit number) or well beyond if using a 64-bit number but maybe
the code<br>
will fail before the largest 64-bit signed (292,271,022,989
years)<br>
or unsigned number is exceeded.</font></p>
<p><font face="monospace"><br>
If it is not fixed in your version, well, good luck.<br>
<br>
sizeof char=1, sizeof short=2, sizeof int=4, sizeof long=8,
sizeof long long=8, sizeof time_t=8<br>
<br>
Current years and seconds since the epoch: 56 1777137911<br>
seconds/year:31536000, seconds/year including leap
year:31557600, delta seconds:21600, delta hours:6<br>
<br>
Biggest signed 4-byte long: years inc= 0, years in
the future= 11, Mon Jan 18 19:14:07 2038<br>
Biggest unsigned 4-byte long: years inc= 0, years in
the future= 79, Sat Feb 6 22:28:15 2106<br>
<br>
Time: years inc= 1, years in the future=
2147437525, Wed Jun 12 15:25:11 2147483647<br>
<br>
Welcome to the Restaurant at the end of the universe. Hello,
your Majesty.<br>
<br>
Biggest signed 8-byte long: years inc= 0, years in
the future= 292271022988,<br>
ERROR: Invalid seconds since Epoch in localtime<br>
Error code: Value too large for defined data type<br>
<br>
Biggest unsigned 8-byte long: years inc= 0, years in
the future= -56, Wed Dec 31 15:59:59 1969</font></p>
<p><font face="Tomson Talks"><br>
</font></p>
</body>
</html>
--------------8beGhQM2BA2891X5vcFEMyxP--
--===============2665928796017872560==
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
--===============2665928796017872560==--