It is not clear whether or not there will ever be general purpose 32-bit distributions that are Y2K38 safe.
More about: @Linux Distance This happens from your point of view.
But from the viewpoint of a programmer it will work as expected: it will reset.
It was the same with the end of mayan calendar: the world didn't fail because of this. The question is "Is the Linux kernel or Ubuntu ready to handle dates after this? Well, it's not capable of handling such dates, so it fail in the context of this question.
Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 Fri Dec 13 1901 Fri Dec 13 1901 Fri Dec 13 1901 Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 Tue Jan 19 2038 @gertvdijk Well, it gives the first output on patched computers, and my Ubuntu laptop gives the second, while the third is from my Debian server.
I didn't actually write the code, it's all over the Internet in the same exact form. The situation for 32-bit Linux (and the compatibility layer for 32-bit binaries on 64-bit Linux) is much less rosy.
I went looking for this to illustrate the 2038 problem to a coworker, and 2 years after making the above comment, I have very little doubt that in 2038 we will have 32 bit machines that will fail. It's broken and fixing it without breaking all existing binaries is not an easy task.
Even if there is some level of backwards compatibility all binaries that want to get correct time will need to be rebuilt to use the new 64-bit time interfaces.
There has been some work done (see for example https://lwn.net/Articles/643234/ and but afaict we are still a long way from a full solution.
Let's assume this problem exists and is not fixed yet. So there is no reason to be concerned, but this is indeed an interesting question.