Most significant systems use Network Time Protocol so leap seconds are adjusted for accordingly.
I know this was tongue-in-cheek, but I wouldn’t worry about it. Every modern system has had (and recommended) the APIs for dealing with larger date ranges for some years, and there are lots of transactions (mortgages, leases, prison terms…) for which dates beyond 2038 are already being stored in computers without problem.
Like Y2K, there will be some scrambling at the end, and a few old apps that can’t handle the transition, but little widespread disaster.
I think the main problem back then was that many programs only used 2 digits for the year, thus 2000 was going to store as 00, which would have been before 99 (1999) in a date comparison. At that time, most programs were still descended from the dawn of personal computers only 25 years earlier when every byte was expensive.
My 1981 IBM PC had 16k, I could only dream of a 64k memory. And a cassette tape drive.
Dennis
Bravo! I am humbled and chagrined.
If feel like you could do the outer modulus even more incomprehensibly with bitmasks (even if it means a few more characters).
This makes the baby Jesus cry.
Some engineers take calendars and leap years very seriously. Please not the date the bug report (SPR) was filed. I loved my old company.