Time runs out for Linux in 2038, what then?

Many people know Linux time is stored in Seconds since 1970. This time field explodes around the year 2032 and can no longer be used. I’m considering writing a new app that tracks the time a file was last read in Android 7.1.1 which is using Linux Kernel 3.18.

I haven’t done any time (date) related programming / record keeping yet and I’m wondering if there is a new format of 64-bit integers or something I can use now. I would write backwards compatability function to the current 32-bit Seconds field currently used in Ubuntu.

Note this isn’t a question about Android which is off-topic. I’ll be developing my bash script in Ubuntu using Linux 4.14 or 5.3 which accesses Linux 3.18 used in Android via USB.

I know the time Linux blows up is still 19 years away, but I like to future-proof my stuff without having to change it later or to at least make future code changes easier. As I’ve been coding for over 30 years chances are good I’ll still love doing it 20 years from now.

Some examples from Wikipedia:

  • Windows: 1 January 1601 to 14 September 30,828
  • Unix and POSIX: 1 January 1970 to AD 292,277,026,596

I think the Unix and POSIX format to the year 292 billion will outlive the sun which means we’ll move off the earth by then and have a new calendar anyway. Plus odds are good my programs will be obsolete 292 billion years from now.

Where can I find the standard for future Linux Time format? Or at least the short list of proposed standards?