End of Time, *nix Time

Bob Toxen via Ale <[email protected]> Fri, 24 Apr 2026 22:43:30 -0400
Newsgroups gmane.org.user-groups.ale
Message-ID <aewqUpwomeqqj/[email protected]>
Will you outlive your *nix system's maximum year?  Original Unix systems'
timekeeping fails in the year 2038, in less than 12 years!

I've created the following C program that you may download, compile,
and run.

  http://verysecurelinux.com/xtime.c

  # Download this program:
  wget http://verysecurelinux.com/xtime.c
  # Compile:
  make xtime
  # Run:
  ./xtime -q

Yes, of course look at the source and run in a non-privileged account
if you don't trust me, and you shouldn't.


Please email me the results you achieve on your *nix and what type, distro,
and version you ran it on at my email address of:

  [email protected]

As many of you know, *nix keeps time as the number of seconds since the
start of January 01, 1970 UTC, known as the epoch.  Originally this was
as a signed 32-bit int.  Unfortunately, the maximum number of seconds
that a signed 32-bit int can hold runs out early in 2038.

Decades ago it was proposed to change this to a signed 32-bit number
that will last until 2106.

It appears that around 2014 most *nix distros changed this value to a
64-bit signed value that should be good until the year 292,271,025,015.
That is theory.  In practice many *nix will fail around the year
2,147,439,551 or sooner.

The Network Time Protocol, running ntp, runs out two years sooner in
2036 because it uses an unsigned 32-bit int of the number of seconds
since 01/01/1900 because, of course, they had to allow for time travel
backwards.  Ha Ha.

Best regards,

Bob Toxen, Retired from CTO
Horizon Network Security
_______________________________________________
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