<div dir="auto">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.<div dir="auto"><br></div><div dir="auto">But it was fun reading about it anyway.😜</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Apr 25, 2026, 23:54 Bob Toxen via Ale <<a href="mailto:ale@ale.org">ale@ale.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've just uploaded the new and improved code to my web site so please<br>
download again and email just me (transam@VerySecureLinux.com) 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. 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 "Day-of-week Month Day ##:##:## Year".<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>
> This made me think of my annoyance at logs for some apps that did<br>
> epoch timestamps. More than once I wrote a script to calculate human<br>
> readable time as it displayed lines from such logs. I???m sure there<br>
> are some who can eyeball epoch and convert it mentally to star date and<br>
> other clock/calendar systems but I wasn???t one of them. > Which also<br>
> made me think of the fact that some logs are in UTC rather than local<br>
> time zone time. At least I could do that conversion in my head.<br>
<br>
> Back when we tested for Y2K bugs many of us who were UNIX admins<br>
> also tested for future dates against the 32 bit limit and other factors.<br>
> I often thought it odd that most UNIX platforms already did 64 bit whereas<br>
> many Linux distros didn???t even if they were on a 64 bit processor.<br>
<br>
> From: Ale <<a href="mailto:ale-bounces@ale.org" target="_blank" rel="noreferrer">ale-bounces@ale.org</a>> On Behalf Of Ron via Ale<br>
> Sent: Saturday, April 25, 2026 1:29 PM<br>
> To: <a href="mailto:ale@ale.org" target="_blank" rel="noreferrer">ale@ale.org</a><br>
> Cc: Ron <<a href="mailto:ron@bclug.ca" target="_blank" rel="noreferrer">ron@bclug.ca</a>><br>
> Subject: Re: [ale] End of Time, *nix Time<br>
> <br>
> <br>
> <br>
> Bob Toxen via Ale wrote on 2026-04-24 19:43:<br>
> <br>
> # Download this program:<br>
> wget <a href="http://verysecurelinux.com/xtime.c" rel="noreferrer noreferrer" target="_blank">http://verysecurelinux.com/xtime.c</a><br>
> # Compile:<br>
> make xtime<br>
> # Run:<br>
> ./xtime -q<br>
> <br>
> I downloaded an compiled this.<br>
> <br>
> Lots of warnings when running `make`, but it compiled.<br>
> <br>
> What am I to make of the output? I can make no sense of it.<br>
> <br>
> <br>
> <br>
> $ ./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.<br>
> <br>
> <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<br>
> <br>
> <br>
> <br>
<br>
> _______________________________________________<br>
> Ale mailing list<br>
> <a href="mailto:Ale@ale.org" target="_blank" rel="noreferrer">Ale@ale.org</a><br>
> <a href="https://mail.ale.org/mailman/listinfo/ale" rel="noreferrer noreferrer" target="_blank">https://mail.ale.org/mailman/listinfo/ale</a><br>
> See JOBS, ANNOUNCE and SCHOOLS lists at<br>
> <a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank" rel="noreferrer">Ale@ale.org</a><br>
<a href="https://mail.ale.org/mailman/listinfo/ale" rel="noreferrer noreferrer" target="_blank">https://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</blockquote></div>